mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: unbreak error reporting for @mention prefix
This commit is contained in:
parent
47e15e3acb
commit
d58cc216c0
3 changed files with 5 additions and 6 deletions
|
|
@ -51,11 +51,9 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
|
|||
}
|
||||
|
||||
// for now, only return error messages for explicit commands
|
||||
public ulong? ErrorChannelFor(MessageCreateEvent evt)
|
||||
public ulong? ErrorChannelFor(MessageCreateEvent evt, ulong userId)
|
||||
{
|
||||
// todo: fix @mention prefix
|
||||
// it only breaks error reporting so I'm not *too* worried about it, but should be fixed eventually
|
||||
if (!HasCommandPrefix(evt.Content, default, out var cmdStart) || cmdStart == evt.Content.Length)
|
||||
if (!HasCommandPrefix(evt.Content, userId, out var cmdStart) || cmdStart == evt.Content.Length)
|
||||
return null;
|
||||
|
||||
return evt.ChannelId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue