mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
minor fix
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
config.json
|
config.json
|
||||||
node_modules
|
node_modules
|
||||||
debug.log
|
debug.log
|
||||||
|
temp.*
|
||||||
@@ -151,8 +151,11 @@ export class Client extends EventEmitter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} token
|
* @param {String} token
|
||||||
|
* @param {Boolean} isUser
|
||||||
*/
|
*/
|
||||||
async login(token, isUser = false) {
|
async login(token, isUser = false) {
|
||||||
|
if (!token) throw "PLEASE PROVIDE A TOKEN!";
|
||||||
|
|
||||||
if (!isUser) token = "Bot " + token;
|
if (!isUser) token = "Bot " + token;
|
||||||
this.axiosCustom = axios.create({
|
this.axiosCustom = axios.create({
|
||||||
baseURL: "https://discord.com/api/",
|
baseURL: "https://discord.com/api/",
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ export default async (message) => {
|
|||||||
// console.log(messages);
|
// console.log(messages);
|
||||||
} else {
|
} else {
|
||||||
// console.log(message);
|
// console.log(message);
|
||||||
console.log(`Guild message recieved from "${message.guild.name}"`);
|
console.log(`Guild message recieved from "${message.guild?.name}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -3,7 +3,7 @@ import { Client, gateWayIntents, message, Interaction } from '../structures/type
|
|||||||
import config from '../config.json' assert { type: 'json' };
|
import config from '../config.json' assert { type: 'json' };
|
||||||
import { buttonTests } from './Buttontests.js';
|
import { buttonTests } from './Buttontests.js';
|
||||||
import { createMenuTests } from './menuTests.js';
|
import { createMenuTests } from './menuTests.js';
|
||||||
const { bottoken } = config;
|
const { token } = config;
|
||||||
|
|
||||||
// switchConsoleDefault();
|
// switchConsoleDefault();
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ var c = new Client({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
c.login(bottoken);
|
c.login(token, true);
|
||||||
|
|
||||||
|
|
||||||
c.on('messageRecieved', /**@param {message} message*/ async (message) => {
|
c.on('messageRecieved', /**@param {message} message*/ async (message) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user