Skip to content

Commit

Permalink
Switch activity to custom state
Browse files Browse the repository at this point in the history
Closes #353
  • Loading branch information
kevinlul committed Aug 20, 2023
1 parent 73fc65d commit 4a8f128
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, GatewayIntentBits, Options, Partials } from "discord.js";
import { ActivityType, Client, GatewayIntentBits, Options, Partials } from "discord.js";
import { injectAll, injectable } from "tsyringe";
import { Listener } from "./events";
import { getLogger } from "./logger";
Expand Down Expand Up @@ -55,7 +55,8 @@ export class BotFactory {
bot.on("guildDelete", guild => logger.notify(`Guild delete: ${serialiseServer(guild)}`));
bot.on("ready", () => {
logger.notify(`Logged in as ${bot.user?.tag} - ${bot.user?.id}`);
bot.user?.setActivity(process.env.BOT_PRESENCE || "<card name> to search!");
const state = process.env.BOT_PRESENCE || "🔎 <card name> to search!";
bot.user?.setActivity(state, { type: ActivityType.Custom });
});

bot.once("ready", () => {
Expand Down

0 comments on commit 4a8f128

Please sign in to comment.