aboutsummaryrefslogtreecommitdiff
path: root/src/bot.ts
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-09-18 17:04:04 -0400
committerMax Isom <[email protected]>2021-09-18 17:04:04 -0400
commit79e7e88fab1ce05cf84abeba2e05300a93b4759c (patch)
treed8504c3ed33884f75269d2c95be819f1b90cc20d /src/bot.ts
parent9a2ef876d381a646f0d66145d8ed3cfa8da7fac3 (diff)
downloadmuse-79e7e88fab1ce05cf84abeba2e05300a93b4759c.tar.xz
muse-79e7e88fab1ce05cf84abeba2e05300a93b4759c.zip
Remove requirement for DISCORD_CLIENT_ID
Closes #336
Diffstat (limited to 'src/bot.ts')
-rw-r--r--src/bot.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/bot.ts b/src/bot.ts
index 1b8f8dd..16bdba0 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -16,14 +16,12 @@ export default class {
private readonly client: Client;
private readonly naturalLanguage: NaturalLanguage;
private readonly token: string;
- private readonly clientId: string;
private readonly commands!: Collection<string, Command>;
- constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Services.NaturalLanguage) naturalLanguage: NaturalLanguage, @inject(TYPES.Config.DISCORD_TOKEN) token: string, @inject(TYPES.Config.DISCORD_CLIENT_ID) clientId: string) {
+ constructor(@inject(TYPES.Client) client: Client, @inject(TYPES.Services.NaturalLanguage) naturalLanguage: NaturalLanguage, @inject(TYPES.Config.DISCORD_TOKEN) token: string) {
this.client = client;
this.naturalLanguage = naturalLanguage;
this.token = token;
- this.clientId = clientId;
this.commands = new Collection();
}
@@ -96,7 +94,7 @@ export default class {
});
this.client.on('ready', async () => {
- console.log(`Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=${this.clientId}&scope=bot&permissions=36752448`);
+ console.log(`Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=${this.client.user?.id ?? ''}&scope=bot&permissions=36752448`);
});
this.client.on('error', console.error);