fix(bot): ensure correct username parsing for mentions
Adjusted mention handling logic to split the username at the colon, ensuring correct comparison for command processing. This prevents false positives when the username contains additional information post-colon.
This commit is contained in:
parent
f491c8be41
commit
d847484b5c
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class ApplicationBot:
|
||||||
|
|
||||||
if body:
|
if body:
|
||||||
mention = body.split()[0].lower()
|
mention = body.split()[0].lower()
|
||||||
if mention == "!applicationbot" or mention in self.username:
|
if mention == "!applicationbot" or mention in self.username.split(":")[0]:
|
||||||
return await self.handle_command(room, sender, body.split(" ", 1)[1])
|
return await self.handle_command(room, sender, body.split(" ", 1)[1])
|
||||||
|
|
||||||
if body and body.startswith("!apply") and not sender == self.client.user_id:
|
if body and body.startswith("!apply") and not sender == self.client.user_id:
|
||||||
|
|
Loading…
Reference in a new issue