// Games /// <summary>The unique id that identifies a game, /// which can be its owner's user ID or the housing channel's ID depending on the type.</summary> public static ulong IdentifierId(this IBaseGame game) { return(game switch { IUserGame userGame => userGame.OwnerId, IChannelGame channelGame => channelGame.ChannelId, _ => game.UserId[0], });
// Games public static ulong IdentifierId(this IBaseGame game) { switch (game) { case IUserGame userGame: return(userGame.OwnerId); case IChannelGame channelGame: return(channelGame.ChannelId); default: return(game.UserId[0]); } }