Ejemplo n.º 1
0
 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...`");
     }
 }
Ejemplo n.º 2
0
        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...`");
            }
        }
Ejemplo n.º 3
0
 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`");
     }
 }
Ejemplo n.º 4
0
        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...`");
            }
        }
Ejemplo n.º 5
0
 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...`");
     }
 }