public TimeoutInfo(List<TimedoutUser> users, TimedoutUser info, IGuildUser user, IGuild guild) { this.users = users; this.info = info; this.user = user; this.guild = guild; }
public static async Task StopTimeoutAsync(List<TimedoutUser> users, TimedoutUser info, IGuildUser user, IGuild guild) { users.Remove(info); Console.WriteLine($"{user.Username}'s time out has been removed!"); var role = guild.Roles.FirstOrDefault(x => x.Name == "qttimedout"); var userroles = user.RoleIds.ToList(); userroles.Remove(role.Id); try { await user.ModifyAsync(x => x.RoleIds = userroles.ToArray()); } catch (Exception) { } info.timer.Dispose(); return; }