fix(dispatcher): ignore casing for bot username

This commit is contained in:
alina sireneva
2025-03-08 19:23:20 +03:00
parent e715738129
commit 86195efa68

View File

@@ -67,7 +67,7 @@ export function command(commands: MaybeArray<string | RegExp>, {
if (lastGroup) {
const self = msg.client.storage.self.getCached()
if (self && self.isBot && !self.usernames.includes(lastGroup)) {
if (self && self.isBot && !self.usernames.some(u => u.toLowerCase() === lastGroup.toLowerCase())) {
return false
}
}