push
This commit is contained in:
parent
720bc8e04c
commit
25c47a06dd
0
app/bot.py
Executable file → Normal file
0
app/bot.py
Executable file → Normal file
@ -16,7 +16,7 @@ class ServerUtils(commands.Cog):
|
|||||||
description="Have the bot DM you an invite link (with the option to make it temporary)",
|
description="Have the bot DM you an invite link (with the option to make it temporary)",
|
||||||
)
|
)
|
||||||
@option(
|
@option(
|
||||||
name="temp",
|
name="temporary_invite",
|
||||||
description="Whether or not to make it a temporary invite",
|
description="Whether or not to make it a temporary invite",
|
||||||
type=bool,
|
type=bool,
|
||||||
default=False,
|
default=False,
|
||||||
@ -32,13 +32,13 @@ class ServerUtils(commands.Cog):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if temp:
|
if temporary_invite:
|
||||||
await ctx.author.send("Here is your temporary invite")
|
await ctx.author.send("Here is your temporary invite")
|
||||||
|
|
||||||
invite = await invite_channel.create_invite(
|
invite = await invite_channel.create_invite(
|
||||||
max_uses=1,
|
max_uses=1,
|
||||||
max_age=3600,
|
max_age=3600,
|
||||||
temporary=temp,
|
temporary=temporary_invite,
|
||||||
)
|
)
|
||||||
await ctx.respond("Check your DMs")
|
await ctx.respond("Check your DMs")
|
||||||
await ctx.author.send(invite)
|
await ctx.author.send(invite)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user