123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import random
- from command_system import as_plugin
- @as_plugin
- def isadmin(message):
- return message.from_admin
- @as_plugin
- def debug(message):
- return message
- @as_plugin
- def echo(message):
- return "'%s' - %s" % (message.raw_args or "", message.name)
- @as_plugin
- def greet():
- return random.choice(("Hi!", "Hello!", "안녕하세요", "こんにちは", "你好", "👋"))
- @as_plugin
- def console(message):
- argstr = message.raw_args
- opts = [
- "NEVER GIVE UP",
- "I believe in you!",
- "You're doing your best, it's okay!"
- ]
- if argstr is not None:
- opts.append("It'll be okay, {}! Keep trying!".format(argstr))
- return random.choice(opts)
- @as_plugin
- def choice(message):
- opts = list(message.args())
- chosen = random.choice(opts)
- return f"Randomly chose {chosen} from {len(opts)} options"
- @as_plugin
- def inquire(message):
- opts = "Yes", "No", "Maybe", "Perhaps", "I guess", "Probably shouldn't", "rand"
- chosen = random.choice(opts)
- if chosen == "rand":
- chosen = string(random.randrange(10))
- return f"{chosen}"
|