コード例 #1
0
ファイル: GuildAccount.cs プロジェクト: svr333/PhoenixBot
 public void RemoveSelfObtainableRole(ulong id)
 {
     if (SelfObtainableRoles.Contains(id))
     {
         SelfObtainableRoles.Remove(id);
     }
     else
     {
         throw new Exception("Role is not on the list.");
     }
 }
コード例 #2
0
ファイル: GuildAccount.cs プロジェクト: svr333/PhoenixBot
 public void AddSelfObtainableRole(ulong id)
 {
     if (SelfObtainableRoles.Contains(id))
     {
         throw new Exception("Role is already on the list");
     }
     else
     {
         SelfObtainableRoles.Add(id);
     }
 }
コード例 #3
0
ファイル: GuildAccount.cs プロジェクト: svr333/PhoenixBot
 public bool RoleIdIsInObtainableRolesList(ulong id)
 => SelfObtainableRoles.Contains(id);