Skip to content

Commit

Permalink
Improve tip response for level-up messages
Browse files Browse the repository at this point in the history
  • Loading branch information
notsniped authored Apr 2, 2024
1 parent c577b1b commit 7781e23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def on_message(ctx):
levelling.add_levels(ctx.author.id, 1)
if settings.fetch_setting(ctx.author.id, "levelup_messages") is True:
try:
await ctx.author.send(f"{ctx.author.mention}, you just ranked up to **level {levelling.get_level(ctx.author.id)}**. Nice!\n\n{':bulb: Tip: This is your global message level and is the same across all servers. If you want to disable it, run `/settings levelup_messages`' if levelling.get_level(ctx.author.id) == 1 else ''}")
await ctx.author.send(f"{ctx.author.mention}, you just ranked up to **level {levelling.get_level(ctx.author.id)}**. Nice!\n\n{':bulb: Tip: This is your global message level and is the same across all servers. If you want to disable DMs for levelling up, run `/settings levelup_messages enabled: False`' if levelling.get_level(ctx.author.id) == 1 else ''}")
except discord.errors.Forbidden:
logger.warn("Unable to send level up message to {ctx.author} ({ctx.author.id}), as they are not accepting DMs from isobot. This ID has been added to `levelup_messages` blacklist.", module="main/Levelling")
settings.edit_setting(ctx.author.id, "levelup_messages", False)
Expand Down

0 comments on commit 7781e23

Please sign in to comment.