Skip to content

Commit 85a7ec9

Browse files
authored
Merge pull request #18 from RillJ/dev
Properly fixed #13, added ToS/PP references
2 parents b2e0970 + 15e091b commit 85a7ec9

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

bot.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
load_dotenv()
4646
BOT_TOKEN = os.getenv("PROD_TOKEN") # ChadCounting token (either PROD_TOKEN or DEV_TOKEN)
4747
guild_data = {} # Global variable for database
48-
bot_version = "1.0.4" # Current version of the bot
48+
bot_version = "1.0.5" # Current version of the bot
4949
chadcounting_color = 0xCA93FF # Color of the embeds
5050
image_gigachad = "https://github.com/RillJ/ChadCounting/blob/main/gigachad.jpeg?raw=true"
5151

@@ -112,7 +112,7 @@ async def on_message_delete(message):
112112
guild_id = message.guild.id
113113
user_id = message.author.id
114114
# If a deleted message is not by someone who counted before, there's no need to continue
115-
if user_id not in guild_data[guild_id]:
115+
if user_id not in guild_data[guild_id]["users"]:
116116
return
117117
current_count = guild_data[guild_id]["current_count"]
118118
last_count = guild_data[guild_id]["previous_message"]
@@ -136,7 +136,7 @@ async def on_message_delete(message):
136136
if success_user_banned == True:
137137
full_text += f" They are now banned for {minutes_to_fancy_string(ban_time_for_troll)} and can't continue counting."
138138
elif success_user_banned == False:
139-
full_text += " However, as they have never counted with ChadCounting before, they won't get banned. Very lucky..."
139+
full_text += " However, they have not been banned. Very lucky..."
140140
embed.add_field(name="", value=full_text, inline=False)
141141
embed.add_field(name="", value=f"The current count is **{current_count}**. Continue counting from there!", inline=False)
142142
counting_channel = bot.get_channel(guild_data[guild_id]["counting_channel"])
@@ -635,7 +635,7 @@ def check_dev_disable_apis(executing_method_name):
635635

636636
#region Command helper functions
637637
async def handle_reaction_setting(interaction, reactions, embed):
638-
"""Handles the reaction setting and sends the response. Part of /setreactions command."""
638+
"""Handles the reaction setting and sends the response. Part of /set reactions command."""
639639
changes_string = "\nNo changes were made to the reactions. Try again, chad."
640640
emoji_string = extract_discord_emoji(reactions)
641641
emoji_string_length = len(emoji_string)
@@ -676,7 +676,8 @@ async def check_correct_channel(interaction):
676676
channel_error = f"You can only execute ChadCounting commands in the counting channel, "
677677
if counting_channel == None:
678678
channel_error += (f"however, it has not been set yet. " +
679-
f"If you are an admin of this server, use the command `/set channel` in the channel you want to count in.")
679+
f"If you are an admin of this server, use the command `/set channel` in the channel you want to count in." +
680+
f"Do not forget to read the Terms of Service and the Privacy Policy before using the bot! Use `/help` for more information.")
680681
embed.add_field(name="", value=channel_error)
681682
await interaction.response.send_message(embed=embed, ephemeral=True)
682683
return False
@@ -795,7 +796,8 @@ async def set_channel(self, interaction: discord.Integration) -> None:
795796
guild_data[guild_id]["previous_message"] = datetime.now()
796797
write_guild_data(guild_data)
797798
embed = chadcounting_embed("ChadCounting channel set")
798-
embed.add_field(name="", value=f"The counting channel is now **'{interaction.channel}'**.")
799+
embed.add_field(name="", value=f"The counting channel is now **'{interaction.channel}'**." +
800+
f"Do not forget to read the Terms of Service and the Privacy Policy before using the bot! Use `/help` for more information.")
799801
else:
800802
embed = chadcounting_embed("ChadCounting channel not set")
801803
embed.add_field(name="", value="Sorry, you don't have the rights to change the channel for counting.")

0 commit comments

Comments
 (0)