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); }
public async Task <List <BotTimeout> > DeleteTimeouts(int broadcasterId, string twitchBotApiLink) { return(await ApiBotRequest.DeleteExecuteAsync <List <BotTimeout> >(twitchBotApiLink + $"bottimeouts/delete/{broadcasterId}")); }
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); }
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); }