Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ION606 committed Apr 2, 2024
1 parent b2573f4 commit e2d34a6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
config.json
node_modules
debug.log
temp.*
3 changes: 3 additions & 0 deletions structures/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ export class Client extends EventEmitter {

/**
* @param {String} token
* @param {Boolean} isUser
*/
async login(token, isUser = false) {
if (!token) throw "PLEASE PROVIDE A TOKEN!";

if (!isUser) token = "Bot " + token;
this.axiosCustom = axios.create({
baseURL: "https://discord.com/api/",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/messageTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ export default async (message) => {
// console.log(messages);
} else {
// console.log(message);
console.log(`Guild message recieved from "${message.guild.name}"`);
console.log(`Guild message recieved from "${message.guild?.name}"`);
}
}
4 changes: 2 additions & 2 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Client, gateWayIntents, message, Interaction } from '../structures/type
import config from '../config.json' assert { type: 'json' };
import { buttonTests } from './Buttontests.js';
import { createMenuTests } from './menuTests.js';
const { bottoken } = config;
const { token } = config;

// switchConsoleDefault();

Expand All @@ -24,7 +24,7 @@ var c = new Client({
});


c.login(bottoken);
c.login(token, true);


c.on('messageRecieved', /**@param {message} message*/ async (message) => {
Expand Down

0 comments on commit e2d34a6

Please sign in to comment.