Wycademy/src/Wycademy/Commands/Services/BlacklistService.cs
/// <summary>
/// Checks if a certain blacklist contains an ID.
/// </summary>
/// <param name="id">The ID to check for.</param>
/// <param name="category">The category to check in.</param>
/// <returns>Whether or not the ID is on the specified blacklist.</returns>
Checks if a certain blacklist contains an ID.
Checks if a certain blacklist contains an ID .
public bool CheckBlacklist(ulong id, BlacklistType category)
        {
            List<ulong> blacklistToCheck = null;
            switch (category)
            {
                case BlacklistType.User:
                    blacklistToCheck = _userBlacklist;
                    break;
                case BlacklistType.Guild:
                    blacklistToCheck = _guildBlacklist;
                    break;
                case BlacklistType.GuildOwner:
                    blacklistToCheck = _guildOwnerBlacklist;
                    break;
            }
            return blacklistToCheck.Contains(id);
        }
public bool CheckBlacklist ( ulong id , BlacklistType category ) { List < ulong > blacklistToCheck = null ; switch ( category ) { case BlacklistType . User : blacklistToCheck = _userBlacklist ; break ; case BlacklistType . Guild : blacklistToCheck = _guildBlacklist ; break ; case BlacklistType . GuildOwner : blacklistToCheck = _guildOwnerBlacklist ; break ; } return blacklistToCheck . Contains ( id ) ; }
Checks if a certain blacklist contains an ID.
Checks if a certain blacklist contains an ID .
// This will never be null, because category will never not be one of the 3 blacklist types.
Whether or not the ID is on the specified blacklist.
Whether or not the ID is on the specified blacklist .
id
ulong
The ID to check for.
The ID to check for .
category
BlacklistType
The category to check in.
The category to check in .