public async Task SetAdmin(ulong id) { var user = await UserQueries.FindOrCreateUser(id); user.Admin = !user.Admin; await UserQueries.Update(user); await SendMessageAsync($"Updated given user admin status to {user.Admin}."); }
public async Task RestrictUser(ulong userId) { string message; var user = await UserQueries.FindOrCreateUser(userId); if (user.Restrict) { user.Restrict = false; message = $"`Unrestricted user {userId} from using Cake!`"; } else { user.Restrict = true; message = $"`Restricted user {userId} from using Cake!`"; } await UserQueries.Update(user); await SendMessageAsync(message); }
public async Task GetUserExperience() { var user = await UserQueries.FindOrCreateUser(Module.Context.User.Id); await SendMessageAsync($"``{user.GetCurrentExp()} xp``"); }