Ejemplo n.º 1
0
        public async Task <string> DeleteUserTimeout(string recipient, int broadcasterId, string twitchBotApiLink)
        {
            UserBotTimeout removedTimeout = await ApiBotRequest.DeleteExecuteTaskAsync <UserBotTimeout>(twitchBotApiLink + $"userbottimeouts/delete/{broadcasterId}?username={recipient}");

            if (removedTimeout == null)
            {
                return("");
            }

            string name = removedTimeout.Username;

            TimedoutUsers.RemoveAll(r => r.Username == name);
            return(name);
        }
Ejemplo n.º 2
0
        public async Task <string> DeleteModerator(string recipient, int broadcasterId, string twitchBotApiLink)
        {
            Moderators removedModerator = await ApiBotRequest.DeleteExecuteTaskAsync <Moderators>(twitchBotApiLink + $"moderators/delete/{broadcasterId}?username={recipient}");

            if (removedModerator == null)
            {
                return("");
            }

            string name = removedModerator.Username;

            Moderators.Remove(name);
            return(name);
        }
Ejemplo n.º 3
0
 public async Task <List <UserBotTimeout> > DeleteTimeouts(int broadcasterId, string twitchBotApiLink)
 {
     return(await ApiBotRequest.DeleteExecuteTaskAsync <List <UserBotTimeout> >(twitchBotApiLink + $"userbottimeouts/delete/{broadcasterId}"));
 }
Ejemplo n.º 4
0
        public async Task DeleteCustomCommand(string twitchBotApiLink, int broadcasterId, string username)
        {
            CustomCommand customCommand = await ApiBotRequest.DeleteExecuteTaskAsync <CustomCommand>(twitchBotApiLink + $"customcommands/delete/{broadcasterId}?name={username}");

            _customCommands.Remove(customCommand);
        }
Ejemplo n.º 5
0
        public async Task DeleteModerator(string twitchBotApiLink, int broadcasterId, string username)
        {
            BotModerator botModerator = await ApiBotRequest.DeleteExecuteTaskAsync <BotModerator>(twitchBotApiLink + $"botmoderators/delete/{broadcasterId}?username={username}");

            _botModerators.Remove(botModerator);
        }