private static void OnSuffixCommand(string arguments) { if (string.IsNullOrWhiteSpace(arguments)) { Console.WriteLine($"{Prefix.Info} The current command suffix is \"{Program.Settings.CommandSuffix}\". You can use \"suffix clear\" to clear it."); return; } if (arguments.Contains(' ')) { Console.WriteLine($"{Prefix.Info} Suffixes cannot contain spaces."); return; } if (arguments == "clear") { Program.Settings.CommandSuffix = string.Empty; Console.WriteLine($"{Prefix.Info} Removed command suffix."); Program.Settings.SaveConfig(General.ConfigPath); } else { Program.Settings.CommandSuffix = arguments; Console.WriteLine($"{Prefix.Info} The new command suffix is \"{Program.Settings.CommandSuffix}\"."); Program.Settings.SaveConfig(General.ConfigPath); } ChatCommands.AddChatCommands(); }
private static void ClientOnReady(object sender, EventArgs eventArgs) { Console.WriteLine($"{Prefix.Info} Connected to Discord sucessfully! ({Client.CurrentUser.Name}#{Client.CurrentUser.Discriminator})"); ChatCommands.AddChatCommands(); Console.WriteLine($"{Prefix.Info} Registered chat commands."); Client.SetGame(Program.Settings.Game); Console.WriteLine($"{Prefix.Info} Now playing: {Program.Settings.Game}"); }