Skip to content

Commit 42f1303

Browse files
committed
Add member role thingy
1 parent 554438b commit 42f1303

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/commands/link.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async def link_account(self, interaction: discord.Interaction, username: str) ->
4646
)
4747

4848
self.logger.info(f'[{interaction.user}] -> Starting linking process...')
49-
49+
5050
# Generate random 6-letter code which will be sent over DMs
5151
code = ''.join(random.choices(string.ascii_lowercase, k=6))
5252
await self.submit_event('link', target_user.id, code)
@@ -152,5 +152,8 @@ async def on_submit(self, interaction: discord.Interaction) -> None:
152152
f'[{interaction.user}] -> Linked account: {self.target_user.name}'
153153
)
154154

155+
# Add member role to let the user access #osu chat
156+
await interaction.user.add_roles(self.cog.member_role)
157+
155158
async def setup(bot: Bot):
156159
await bot.add_cog(AccountLinking())

0 commit comments

Comments
 (0)