Пример #1
0
        public async Task <string> DeleteUserTimeout(string recipient, int broadcasterId, string twitchBotApiLink)
        {
            BotTimeout removedTimeout = await ApiBotRequest.DeleteExecuteAsync <BotTimeout>(twitchBotApiLink + $"bottimeouts/delete/{broadcasterId}?username={recipient}");

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

            string name = removedTimeout.Username;

            TimedoutUsers.RemoveAll(r => r.Username == name);
            return(name);
        }
Пример #2
0
 public async Task <List <BotTimeout> > DeleteTimeouts(int broadcasterId, string twitchBotApiLink)
 {
     return(await ApiBotRequest.DeleteExecuteAsync <List <BotTimeout> >(twitchBotApiLink + $"bottimeouts/delete/{broadcasterId}"));
 }
Пример #3
0
        public async Task DeleteModerator(string twitchBotApiLink, int broadcasterId, string username)
        {
            BotModerator botModerator = await ApiBotRequest.DeleteExecuteAsync <BotModerator>(twitchBotApiLink + $"botmoderators/delete/{broadcasterId}?username={username}");

            _botModerators.Remove(botModerator);
        }
Пример #4
0
        public async Task DeleteCustomCommand(string twitchBotApiLink, int broadcasterId, string username)
        {
            CustomCommand customCommand = await ApiBotRequest.DeleteExecuteAsync <CustomCommand>(twitchBotApiLink + $"customcommands/delete/{broadcasterId}?name={username}");

            _customCommands.Remove(customCommand);
        }