support: log why the code was created

This commit is contained in:
Io Mintz 2020-04-18 22:15:23 +00:00
parent c7c0cab64c
commit 28423f85c6
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ class Meta(commands.Cog):
await context.send('This command is temporarily unavailable. Try again later?')
return
invite = await ch.create_invite(max_age=self.INVITE_DURATION_SECONDS, max_uses=self.MAX_INVITE_USES)
reason = f'Created for {context.author} (ID: {context.author.id})'
invite = await ch.create_invite(max_age=self.INVITE_DURATION_SECONDS, max_uses=self.MAX_INVITE_USES, reason=reason)
try:
await context.author.send(f'Official support server invite: {invite}')