From 8bfea671958c32b0bd3e42e73869b963823fd777 Mon Sep 17 00:00:00 2001 From: Thijs Miedema Date: Tue, 28 Nov 2023 20:24:22 +0100 Subject: [PATCH] Remove update message --- src/rollbot/bot/events.py | 53 --------------------------------------- src/rollbot/bot/text.py | 8 ------ 2 files changed, 61 deletions(-) diff --git a/src/rollbot/bot/events.py b/src/rollbot/bot/events.py index a62211a..888a0cd 100644 --- a/src/rollbot/bot/events.py +++ b/src/rollbot/bot/events.py @@ -72,56 +72,3 @@ async def on_guild_join(guild): return logging.error("Could not say hello to {} sadly... :(".format(guild.name)) - -async def update_server(channel): - if channel and channel.permissions_for(channel.guild.me).send_messages: - try: - await channel.send( - embed=discord.Embed( - title="Thank you for using roll-bot!", - type="rich", - description=text.welcome_text.strip(), - ) - ) - logging.warning("Said hello to {}!".format(channel.guild.name)) - return True - except Exception: - return False - return False - - -@bot.event -async def on_message(message): - # we do not want the bot to reply to itself - if message.author == bot.user: - return - - # we don't want the bot to reply to other bots - if message.author.bot: - return - - # we don't care here about messages not associated to a guild - if message.guild is None: - return - - UPDATE_LVL = 1 - env = var_env_provider.get("__internal__") - update_level = int(env.get(f"GuildULVL[{message.guild.id}]") or "0") - - if update_level >= UPDATE_LVL: - return - - try: - if message.content.startswith("="): - await message.channel.send( - embed=discord.Embed( - title="Rollbot has updated!", - type="rich", - description=text.update_text.strip(), - ) - ) - env.set(f"GuildULVL[{message.guild.id}]", str(UPDATE_LVL)) - var_env_provider.update(env) - except: # noqa: E722 - # We don't care if message.content is gone now - pass diff --git a/src/rollbot/bot/text.py b/src/rollbot/bot/text.py index 036db44..0aa0272 100644 --- a/src/rollbot/bot/text.py +++ b/src/rollbot/bot/text.py @@ -30,14 +30,6 @@ """ -update_text = """ - Rollbot has migrated to discord slash commands. The old message - intents in discord will no longer work, see [here](https://discord.com/blog/slash-commands-are-here). - Use /roll from now on. This message will only be shown once. - You might need to re-invite the bot to get the slash commands to work. You can do that [here](https://discord.com/api/oauth2/authorize?client_id=712234733542572063&permissions=2147534848&scope=bot%20applications.commands). -""" - - welcome_text = """ Rollbot supports Discord slash commands. Use /roll and /distribution to roll dice. If you need any help, check out [the website](https://tmiedema.com/rollbot)! You can find a