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