Skip to content

Commit 5d1f90d

Browse files
committed
Updating message points
1 parent e56ee3a commit 5d1f90d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/cogs/moderation/moderation_points_messaging.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ async def on_message(self, message):
2020
On every message, do things.
2121
Unless you are the bot listening.
2222
"""
23+
2324
if message.author != self.bot.user:
25+
points_for_message = len(message.content.split(' '))
2426
log_debug(f'Point added to {message.author} for sending a message.')
25-
give_points_to_user(message.author.id, 1)
27+
give_points_to_user(message.author.id, points_for_message)
2628

2729
@commands.Cog.listener()
2830
async def on_message_delete(self, message):
@@ -31,8 +33,9 @@ async def on_message_delete(self, message):
3133
Unless you are the bot listening.
3234
"""
3335
if message.author != self.bot.user:
36+
points_for_message = len(message.content.split(' '))
3437
log_debug(f'Point removed from {message.author} for deleting a message.')
35-
remove_points_from_user(message.author.id, 1)
38+
remove_points_from_user(message.author.id, points_for_message)
3639

3740

3841
def setup(bot):

0 commit comments

Comments
 (0)