Class MpGameService<TGame, TPlayer>.MpGameData
Contains metadata about a game given a command context.
Implements
Namespace: Discord.Addons.MpGame
Assembly: Discord.Addons.MpGame.dll
Syntax
public sealed class MpGameData : IMpGameData
Properties
| Improve this Doc View SourceGame
The instance of the game being played (if active).
Declaration
public TGame Game { get; }
Property Value
Type | Description |
---|---|
TGame |
GameInProgress
Determines if a game in the current channel is in progress or not.
Declaration
public CurrentlyPlaying GameInProgress { get; }
Property Value
Type | Description |
---|---|
CurrentlyPlaying |
JoinedUsers
Declaration
public IReadOnlyCollection<IUser> JoinedUsers { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IUser> |
Remarks
note
This is an immutable snapshot, it is not updated until the next time an instance of this class is created.
OpenToJoin
Determines if a game in the current channel is open to join or not.
Declaration
public bool OpenToJoin { get; }
Property Value
Type | Description |
---|---|
Boolean |
Player
The player object that wraps the user executing this command (if a game is active AND the user is a player in that game).
Declaration
public TPlayer Player { get; }
Property Value
Type | Description |
---|---|
TPlayer |
Explicit Interface Implementations
| Improve this Doc View SourceIMpGameData.GameChannelId
Id of the public-facing channel of this game.
Declaration
ulong? IMpGameData.GameChannelId { get; }
Returns
Type | Description |
---|---|
Nullable<UInt64> |
IMpGameData.JoinedUsers
The list of users ready to play.
Declaration
IReadOnlyCollection<ulong> IMpGameData.JoinedUsers { get; }
Returns
Type | Description |
---|---|
IReadOnlyCollection<UInt64> |
IMpGameData.PlayerUserId
Id of the player invoking this command.
Declaration
ulong? IMpGameData.PlayerUserId { get; }
Returns
Type | Description |
---|---|
Nullable<UInt64> |