Skip to content

Commit

Permalink
Merge pull request #194 from zond/johnpooch/add-webhooks-to-game
Browse files Browse the repository at this point in the history
Add DiscordStartGameWebhook and DiscordPhaseUpdateWebhook to Game
  • Loading branch information
johnpooch authored Jun 13, 2024
2 parents 35081c1 + cf3bcec commit b42db4e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions game/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,16 @@ func (g Games) Item(r Request, user *auth.User, cursor *datastore.Cursor, limit
return gamesItem
}

type DiscordWebhook struct {
Id string
Token string
}

type DiscordWebhooks struct {
GameStarted DiscordWebhook
PhaseStarted DiscordWebhook
}

type Game struct {
ID *datastore.Key `datastore:"-"`

Expand Down Expand Up @@ -454,6 +464,7 @@ type Game struct {
ChatLanguageISO639_1 string `methods:"POST,PUT"`
GameMasterEnabled bool `methods:"POST"`
RequireGameMasterInvitation bool `methods:"POST,PUT"`
DiscordWebhooks *DiscordWebhooks `methods:"POST" datastore:",noindex"`

GameMasterInvitations GameMasterInvitations
GameMaster auth.User
Expand Down

0 comments on commit b42db4e

Please sign in to comment.