Archived
fixed token
This commit is contained in:
1 parent
74ec7252ae
commit
f6fdcde0c3
1 file changed
+8
-2
+8
-2
@@ -60,8 +60,14 @@ class Bot {
|
|||||||
try {
|
try {
|
||||||
console.log(`Bot name: ${this.name}`);
|
console.log(`Bot name: ${this.name}`);
|
||||||
console.log(`Prefix: ${this.config.prefix} \n`);
|
console.log(`Prefix: ${this.config.prefix} \n`);
|
||||||
const loginToken: string = token || this.config.token || '';
|
let loginToken;
|
||||||
if(loginToken === '') {
|
if(this.config.token) {
|
||||||
|
loginToken = this.config.token;
|
||||||
|
}
|
||||||
|
else if(token) {
|
||||||
|
loginToken = token;
|
||||||
|
}
|
||||||
|
else {
|
||||||
throw new ReferenceError('No token specified. Please pass your Discord application token as an argument to the "start" method or in the constructor');
|
throw new ReferenceError('No token specified. Please pass your Discord application token as an argument to the "start" method or in the constructor');
|
||||||
}
|
}
|
||||||
if(port) {
|
if(port) {
|
||||||
|
|||||||
Reference in new issue
Block a user