Skip to content

Commit c422edc

Browse files
committed
deleting a message also removes the points = to the amount of words in the message.
1 parent 357bf2a commit c422edc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/zorak/cogs/utility/points.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ async def on_message(self, message: discord.Message):
4040
@commands.Cog.listener()
4141
async def on_message_delete(self, message: discord.Message):
4242
"""When a member deletes a message, remove a point."""
43+
message_value = len(message.content.split(" "))
4344
mod_log = await self.bot.fetch_channel(self.bot.server_settings.log_channel["mod_log"])
44-
await mod_log.send(f"1 Point removed from {message.author} for deleting a message.")
45-
self.bot.db_client.remove_points_from_user(message.author.id, 1)
45+
await mod_log.send(f"{message_value} Point/s removed from {message.author} for deleting a message.")
46+
self.bot.db_client.remove_points_from_user(message.author.id, abs(message_value))
4647
#
4748
# # TODO: Fix the backup command.
4849
# # @commands.slash_command()

0 commit comments

Comments
 (0)