invites now link to whatever voice channel you are in when you run the command. if not in a voice channel, it goes to the channel the command was run in
This commit is contained in:
parent
3764736d60
commit
7748a54d3c
@ -248,8 +248,11 @@ async def on_message(message):
|
|||||||
|
|
||||||
if message.content.startswith('!invite'):
|
if message.content.startswith('!invite'):
|
||||||
# 3600 = 1 hour
|
# 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(
|
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)
|
await client.send_message(message.channel, invite)
|
||||||
|
|
||||||
|
@ -74,8 +74,8 @@ def get_help_message(method):
|
|||||||
'Shows you this message'
|
'Shows you this message'
|
||||||
],
|
],
|
||||||
'invite': [
|
'invite': [
|
||||||
'Generates a one time use invite to the current channel.',
|
'Generates a one time use invite to the voice channel you are currently in.\n',
|
||||||
'Be quick! It expires in 12 hours'
|
'if you are not in a voice channel, the invite will be for whatever channel !invite was typed in.\n',
|
||||||
],
|
],
|
||||||
'issue': [
|
'issue': [
|
||||||
'Creates an issue on gitlab with the passed in parameters\n',
|
'Creates an issue on gitlab with the passed in parameters\n',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user