Skip to content

Commit 357bf2a

Browse files
committed
on_message points now counts words in the message, and assigns points based on message length
1 parent b30d8f2 commit 357bf2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/zorak/cogs/utility/points.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ async def on_message(self, message: discord.Message):
3434
"""When a member sends a message, give them 1 point."""
3535
if message.author.bot:
3636
return
37-
self.bot.db_client.add_points_to_user(message.author.id, 1)
37+
message_value = len(message.content.split(" "))
38+
self.bot.db_client.add_points_to_user(message.author.id, abs(message_value))
3839

3940
@commands.Cog.listener()
4041
async def on_message_delete(self, message: discord.Message):

0 commit comments

Comments
 (0)