diff --git a/app/dragon-bot.py b/app/dragon-bot.py index 9e2bd309..4baff0d0 100644 --- a/app/dragon-bot.py +++ b/app/dragon-bot.py @@ -248,8 +248,11 @@ async def on_message(message): if message.content.startswith('!invite'): # 3600 = 1 hour + invite_channel = message.channel + if message.author.voice.voice_channel: + invite_channel = message.author.voice.voice_channel invite = await client.create_invite( - destination=message.channel, max_uses=1, max_age=3600 + destination=invite_channel, max_uses=1, max_age=3600 ) await client.send_message(message.channel, invite) diff --git a/app/help_methods.py b/app/help_methods.py index 8098bc9f..ae488009 100644 --- a/app/help_methods.py +++ b/app/help_methods.py @@ -74,8 +74,8 @@ def get_help_message(method): 'Shows you this message' ], 'invite': [ - 'Generates a one time use invite to the current channel.', - 'Be quick! It expires in 12 hours' + 'Generates a one time use invite to the voice channel you are currently in.\n', + 'if you are not in a voice channel, the invite will be for whatever channel !invite was typed in.\n', ], 'issue': [ 'Creates an issue on gitlab with the passed in parameters\n',