Added filtering by user and channel

This commit is contained in:
2026-04-20 07:03:01 +03:00
parent 38f80dbaf3
commit 1c48c46eb2
+7 -1
View File
@@ -26,7 +26,9 @@ condition_tokens = {
"^" "^"
} }
variable_tokens = { variable_tokens = {
"msg" "msg",
"userid",
"channelid"
} }
match_tokens = { match_tokens = {
"has", "has",
@@ -184,6 +186,10 @@ async def on_message(message: nextcord.Message):
if type(condition_group) == list: if type(condition_group) == list:
if condition_group[0] == "msg": if condition_group[0] == "msg":
comparing_var = message.content comparing_var = message.content
if condition_group[0] == "userid":
comparing_var = str(message.author.id)
if condition_group[0] == "channelid":
comparing_var = str(message.channel.id)
previous_condition = condition previous_condition = condition