public async Task PreventNicknameChange(SocketGuildUser target) { TGCUser user = FourAcesCasino.GetTGCUser(target); if (user.Blocked_Nickname_By != 0) { user.Blocked_Nickname_By = 0; await ReplyAsync("Removed the mark preventing that user from changing their nickname"); } else { user.Blocked_Nickname_By = Context.User.Id; await ReplyAsync("User has been marked as unable to change their nickname\nNote that if they have the Discord permission (or have admin perms) they can set it anyway"); } }
protected override void BeforeExecute(CommandInfo command) { var usr = TheGrandCodingGuild.GetUser(Context.User.Id); var tgcUser = FourAcesCasino.GetTGCUser(usr); Self = tgcUser; if (Self.User.Guild.Id != TheGrandCodingGuild.Id) { LogMsg("Invalid guild for Self TGC user " + Self.User.Guild.Name); Self.User = TheGrandCodingGuild.GetUser(Self.User.Id); } if (command.Name.StartsWith("toggle ")) { if (Self.Blocked_Toggle_By != 0) { } } base.BeforeExecute(command); }