public static async Task Setprefix(SocketMessage message, string[] arg, string msg) { if (RoleUtils.IsUserBotAdmin(message.Author.Id)) { try { if (arg.Count() > 1) { string prefix = msg.Substring(10); ConfigUtils.Configuration.Prefix = prefix; ConfigUtils.Save(@"resources\config\config.json"); await message.Channel.SendMessageAsync($":white_check_mark: `The prefix is now '{prefix}'`"); } else { ConfigUtils.Configuration.Prefix = ConfigUtils.DEFAULT_PREFIX; ConfigUtils.Save(@"resources\config\config.json"); await message.Channel.SendMessageAsync($":white_check_mark: `The prefix has been reset.`"); } } catch { await message.Channel.SendMessageAsync($":no_entry: `Could not change the dank prefix :/`"); } } else { await message.Channel.SendMessageAsync($":no_entry: `Your KD is too low to execute this command...`"); } }
public static async Task Setgame(SocketMessage message, string[] arg, string msg) { if (RoleUtils.IsUserBotAdmin(message.Author.Id)) { try { if (arg.Count() > 1) { string game = msg.Substring(8); await Program.client.SetGameAsync(game); ConfigUtils.Configuration.Playing = game; ConfigUtils.Save(@"resources\config\config.json"); await message.Channel.SendMessageAsync($":white_check_mark: `The game is now '{game}'`"); } else { await Program.client.SetGameAsync(""); ConfigUtils.Configuration.Playing = ""; ConfigUtils.Save(@"resources\config\config.json"); await message.Channel.SendMessageAsync($":white_check_mark: `The game has been reset !`"); } } catch (Exception ex) { Logger.WriteLine($"Error: {ex.Message}", ConsoleColor.Red); } } else { await message.Channel.SendMessageAsync($":no_entry: `Your KD is too low to execute this command...`"); } }
public static async Task Amibotadmin(SocketMessage message, string[] arg, string msg) { if (!RoleUtils.IsUserBotAdmin(message.Author.Id)) { await message.Channel.SendMessageAsync($":no_entry: `You are not bot admin`"); } else { await message.Channel.SendMessageAsync($":white_check_mark: `You are bot admin`"); } }
public static async Task Stop(SocketMessage message, string[] arg, string msg) { if (RoleUtils.IsUserBotAdmin(message.Author.Id)) { await message.Channel.SendMessageAsync($":white_check_mark: `Have a dank day m8 !`"); Program.Disconnect().Start(); } else { await message.Channel.SendMessageAsync($":no_entry: `Your KD is too low to execute this command...`"); } }
public static async Task Reload(SocketMessage message, string[] arg, string msg) { if (!RoleUtils.IsUserBotAdmin(message.Author.Id)) { try { ConfigUtils.Load(@"resources\config\config.json"); await message.Channel.SendMessageAsync($":white_check_mark: `The configuration has been reloaded`"); } catch { await message.Channel.SendMessageAsync($":no_entry: `Could not reload the configuration :/`"); } } else { await message.Channel.SendMessageAsync($":no_entry: `Your KD is too low to execute this command...`"); } }