Skip to content

Commit 9857b77

Browse files
Techbot121Meta Construct
authored andcommitted
let's wait for the gamebridge to be ready instead
we need to wait for it anyway for the button interactions
1 parent bd6c707 commit 9857b77

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/services/discord/modules/webhook-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default async (bot: DiscordBot): Promise<void> => {
9898
});
9999

100100
let webhook: Discord.Webhook;
101-
const bridge = bot.bridge;
101+
const bridge = await bot.container.getService("GameBridge");
102102
const chatWebhook = bot.bridge.discordChatWH;
103103

104104
bot.discord.on("ready", async () => {

app/services/gamebridge/GameBridge.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export default class GameBridge extends Service {
2727

2828
constructor(container: Container) {
2929
super(container);
30-
this.initGameBridge();
30+
this.init();
3131
}
3232

33-
private async initGameBridge() {
33+
private async init() {
3434
this.webApp = await this.container.getService("WebApp");
3535
this.ws = new WebSocketServer({
3636
httpServer: this.webApp.http,

0 commit comments

Comments
 (0)