mirror of
https://github.com/Jetsparrow/jetherald.git
synced 2026-01-20 23:56:08 +03:00
Fix bot username parsing in commands
This commit is contained in:
parent
54c126353a
commit
89d5d2b9b5
@ -30,7 +30,7 @@ namespace JetHerald
|
||||
var text = args.Message.Text;
|
||||
if (CommandString.TryParse(text, out var cmd))
|
||||
{
|
||||
if (cmd.UserName != null && cmd.UserName != Username)
|
||||
if (cmd.Username != null && cmd.Username != Username)
|
||||
{
|
||||
Log.LogDebug("Message not directed at us");
|
||||
return null;
|
||||
|
||||
@ -9,11 +9,12 @@ namespace JetHerald
|
||||
public CommandString(string command, string username, params string[] parameters)
|
||||
{
|
||||
Command = command;
|
||||
Username = username;
|
||||
Parameters = parameters;
|
||||
}
|
||||
|
||||
public string Command { get; }
|
||||
public string UserName { get; }
|
||||
public string Username { get; }
|
||||
public string[] Parameters { get; }
|
||||
|
||||
static readonly char[] WS_CHARS = new[] { ' ', '\r', '\n', '\n' };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user