Implemented checking for dm privacy settings
parent
678e912f13
commit
9cd5e8efa4
9
bot.py
9
bot.py
|
@ -185,7 +185,14 @@ class ApplicationStartButtonView(discord.ui.View):
|
|||
user = await interaction.user.create_dm()
|
||||
embedd = discord.Embed(title=f'CreaTopia Application', description="Hey! Your application has started. You have 300 seconds to complete it.")
|
||||
embedd.add_field(value=f'You can cancel the application by answering "cancel" to any of the questions', name="", inline=False)
|
||||
await user.send(embed=embedd)
|
||||
|
||||
try:
|
||||
await user.send(embed=embedd)
|
||||
except discord.Forbidden:
|
||||
interaction.response.send_message(content="Can't start application. Please allow direct messages from server members in your privacy settings.", ephemeral=True)
|
||||
return
|
||||
|
||||
await interaction.response.send_message(content="Application started", ephemeral=True)
|
||||
|
||||
application = {'userId': interaction.user.id}
|
||||
|
||||
|
|
Loading…
Reference in New Issue