Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke webhooks on game start and phase start #196

Merged
merged 7 commits into from
Jun 17, 2024

Conversation

johnpooch
Copy link
Collaborator

No description provided.

game/game.go Outdated
@@ -1142,6 +1143,27 @@ func asyncStartGame(ctx context.Context, gameID *datastore.Key, host string) err
}
g.ID = gameID

discordBotToken, err := auth.GetDiscordBotToken(ctx)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stuff happening here and in phase.go are very similar. Perhaps extract them to some "call discord webhook with given data"-function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Let me know if you're happy with this approach and I'll merge. Have tested against local container and it works

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@zond
Copy link
Owner

zond commented Jun 17, 2024

I think it looks good.

@johnpooch johnpooch merged commit 1b1e1b7 into master Jun 17, 2024
1 check failed
@johnpooch johnpooch deleted the johnpooch/add-webhooks-to-game branch June 17, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants