fix: bot crashing whenever someone disabled DMs and warning
This commit is contained in:
parent
81be67064b
commit
518a567806
@ -28,9 +28,11 @@ async def time_to_bereal():
|
||||
|
||||
# Send message to all subscribers
|
||||
for subscriber in subscribers:
|
||||
try:
|
||||
user = await app.fetch_user(subscriber.user_id)
|
||||
await user.send(f"# :warning: Time to BeReal. :warning:\nCapture a BeReal and see what you friends are up to!\n<t:{t}:R>")
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
app.time_to_bereal = time_to_bereal
|
||||
|
||||
|
@ -17,7 +17,8 @@ class SubscribeCommand(commands.Cog):
|
||||
await interaction.response.send_message(
|
||||
":information_source: You have been subscribed to **BeReal. notifications**\n\
|
||||
:arrow_right: You will receive every day notifications whenever it's\
|
||||
time to BeReal.\n:warning: You may unsubscribe at any time using `/unsubscribe`.",
|
||||
time to BeReal.\n:warning: You may unsubscribe at any time using `/unsubscribe`.\n\
|
||||
:red_circle: **Make sure you enabled DMs from this server!**",
|
||||
ephemeral=True,
|
||||
)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user