command = None
if command is None:
- valid_commands = ['coords', 'close_to', 'direction', 'distance', 'edts', 'find', 'fuel_usage', 'galmath', 'id', 'raikogram', 'time']
+ valid_commands = ['coords', 'close_to', 'direction', 'distance', 'edts', 'find', 'fuel_usage', 'galmath', 'id', 'raikogram', 'time', 'url']
valid_commands += plugins.valid_commands()
lines = [
'<@{}>, the cat-like robot from the 34th century of the future, recognises these commands (and more):'.format(client.user.id),
'```time```',
'Useful for `announce create` or to check in-game time.'
]
+ elif command == 'url':
+ lines = [
+ 'Show URL to invite me to a server.',
+ '```url```'
+ ]
elif command in ['coords', 'close_to', 'direction', 'distance', 'edts', 'find', 'fuel_usage', 'galmath', 'raikogram']:
params = modules['edi']
fn = params['fn']
yield from bot.maybe_play_sound(bot.voice_channel_for_user(message.author), 'purr.wav', join = False)
return
+ elif command == 'url':
+ # Invite URL.
+ yield from bot.say(message.channel, "<{}>".format(discord.utils.oauth_url(client.user.id)))
+ return
+
yield from bot.maybe_say(message.channel, 'purr', wake = False)
yield from bot.maybe_play_sound(bot.voice_channel_for_user(message.author), 'purr.wav', join = False)
'any': {
'fn': do_commands,
'args': [True],
- 'commands': ['help', 'time']
+ 'commands': ['help', 'time', 'url']
},
'edi': {
'fn': do_edi,