Skip to content

Commit bcd4642

Browse files
committed
the ready event is deprecated...
1 parent cc26227 commit bcd4642

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

app/services/discord/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class DiscordBot extends Service {
5454
this.data = await this.container.getService("Data");
5555
this.bridge = await this.container.getService("GameBridge");
5656

57-
this.discord.on("ready", async client => {
57+
this.discord.on("clientReady", async client => {
5858
this.ready = true;
5959
console.log(`'${client.user.username}' Discord Bot has logged in`);
6060
});

app/services/discord/modules/discord-guild-icon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const getEventIcon = async () => {
8686
};
8787

8888
export default async (bot: DiscordBot): Promise<void> => {
89-
bot.discord.on("ready", async () => {
89+
bot.discord.on("clientReady", async () => {
9090
const guild = bot.getGuild();
9191
if (!guild) return;
9292
const data = await bot.container.getService("Data");

app/services/discord/modules/premium-progress-bar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default (bot: DiscordBot): void => {
2525
}
2626
}
2727
};
28-
bot.discord.on("ready", setProgressBar);
28+
bot.discord.on("clientReady", setProgressBar);
2929
bot.discord.on("guildUpdate", (oldGuild, newGuild) => {
3030
// not sure if this actually works
3131
if (oldGuild.premiumTier !== newGuild.premiumTier) setProgressBar();

app/services/discord/modules/temp-voice-channels.ts

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

22-
bot.discord.on("ready", async () => {
22+
bot.discord.on("clientReady", async () => {
2323
if (!channels) return;
2424
const guildChannels = bot.getGuild()?.channels;
2525
if (guildChannels) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default async (bot: DiscordBot): Promise<void> => {
110110
let webhook: Discord.Webhook;
111111
const bridge = await bot.container.getService("GameBridge");
112112

113-
bot.discord.on("ready", async () => {
113+
bot.discord.on("clientReady", async () => {
114114
const channel = bot.getTextChannel(bot.config.channels.publicCommits);
115115
if (channel) {
116116
const hooks = await channel.fetchWebhooks();

app/services/gamebridge/GameBridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default class GameBridge extends Service {
110110
bridge: this,
111111
serverConfig: servers.find(s => s.id === id) as GameServerConfig,
112112
}));
113-
server.discord.on("ready", () => {
113+
server.discord.on("clientReady", () => {
114114
server.changeIcon(
115115
"https://gitlab.com/metastruct/branding/-/raw/master/icons/seagull_resonite.png?&inline=true"
116116
);

app/services/gamebridge/GameServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default class GameServer {
7777

7878
this.discord.run(this.config.discordToken);
7979

80-
this.discord.on("ready", async client => {
80+
this.discord.on("clientReady", async client => {
8181
for (const [, payload] of Object.entries(config.bridge.payloads)) {
8282
payload.initialize(this);
8383
}

app/services/gamebridge/discord/DiscordClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class DiscordClient extends Discord.Client {
1212

1313
this.gameServer = gameServer;
1414

15-
this.on("ready", () => {
15+
this.on("clientReady", () => {
1616
this.ready = true;
1717
});
1818

0 commit comments

Comments
 (0)