Skip to content

Commit

Permalink
Merge pull request #349 from PyBotDevs/add-disable-levelup-messages-c…
Browse files Browse the repository at this point in the history
…md-hint

Add tip for new level 1 users to disable level-up messages
  • Loading branch information
notsniped authored Apr 2, 2024
2 parents 012babb + 5135756 commit 3399cb2
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!")
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 ''}")
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 3399cb2

Please sign in to comment.