public async Task OnExecute(CommandContext command, string steamID, string duration, [RemainingText] string reason = "") { if (!ConfigParser.IsCommandChannel(command.Channel.Id)) { return; } if (!ConfigParser.ValidatePermission(command)) { return; } Interface.MessageWrapper message = new Interface.MessageWrapper { BanCommand = new Interface.BanCommand { ChannelID = command.Channel.Id, SteamID = steamID, Duration = duration, AdminTag = command.Member.Username + "#" + command.Member.Discriminator, Reason = reason } }; NetworkSystem.SendMessage(message); Logger.Debug("Sending '" + command.Message.Content + "' to plugin from " + command.Member.Username + "#" + command.Member.Discriminator, LogID.Discord); }
public async Task OnExecute(CommandContext command) { if (!ConfigParser.IsCommandChannel(command.Channel.Id)) { return; } if (!ConfigParser.ValidatePermission(command)) { return; } Interface.MessageWrapper message = new Interface.MessageWrapper { ListCommand = new Interface.ListCommand { ChannelID = command.Channel.Id } }; NetworkSystem.SendMessage(message); Logger.Debug("Sending '" + command.Message.Content + "' to plugin from " + command.Member.Username + "#" + command.Member.Discriminator, LogID.Discord); }
public async Task OnExecute(CommandContext command, ulong steamID) { if (!ConfigParser.IsCommandChannel(command.Channel.Id)) { return; } if (!ConfigParser.ValidatePermission(command)) { return; } if (steamID.ToString().Length != 17) { DiscordEmbed error = new DiscordEmbedBuilder { Color = DiscordColor.Red, Description = "That SteamID doesn't seem to be the right length." }; await command.RespondAsync(error); return; } Interface.MessageWrapper message = new Interface.MessageWrapper { SyncRoleCommand = new Interface.SyncRoleCommand { ChannelID = command.Channel.Id, DiscordID = command.Member.Id, DiscordTag = command.Member.Username, SteamID = steamID } }; NetworkSystem.SendMessage(message); Logger.Debug("Sending '" + command.Message.Content + "' to plugin from " + command.Member.Username + "#" + command.Member.Discriminator, LogID.Discord); }