mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor: switch api and gateway to V8 (#4879)
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
const assert = require('assert');
|
||||
const { token } = require('./auth');
|
||||
const { Client } = require('../src');
|
||||
const { Client, Intents } = require('../src');
|
||||
|
||||
const client = new Client();
|
||||
const client = new Client({
|
||||
intents: Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
client.on('ready', async () => {
|
||||
try {
|
||||
|
||||
@@ -9,7 +9,9 @@ const Discord = require('../src');
|
||||
|
||||
console.time('magic');
|
||||
|
||||
const client = new Discord.Client();
|
||||
const client = new Discord.Client({
|
||||
intents: Discord.Intents.NON_PRIVILEGED
|
||||
});
|
||||
|
||||
client
|
||||
.login(token)
|
||||
|
||||
@@ -7,7 +7,9 @@ const fetch = require('node-fetch');
|
||||
const { owner, token } = require('./auth.js');
|
||||
const Discord = require('../src');
|
||||
|
||||
const client = new Discord.Client();
|
||||
const client = new Discord.Client({
|
||||
intents: Discord.Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
const fill = c => Array(4).fill(c.repeat(1000));
|
||||
const buffer = l => fetch(l).then(res => res.buffer());
|
||||
|
||||
@@ -6,17 +6,13 @@ const Discord = require('../src');
|
||||
const client = new Discord.Client({
|
||||
shards: process.argv[2],
|
||||
shardCount: process.argv[3],
|
||||
intents: Discord.Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
client.on('message', msg => {
|
||||
if (msg.content.startsWith('?eval') && msg.author.id === '66564597481480192') {
|
||||
try {
|
||||
const com = eval(
|
||||
msg.content
|
||||
.split(' ')
|
||||
.slice(1)
|
||||
.join(' '),
|
||||
);
|
||||
const com = eval(msg.content.split(' ').slice(1).join(' '));
|
||||
msg.channel.send(com, { code: true });
|
||||
} catch (e) {
|
||||
msg.channel.send(e, { code: true });
|
||||
|
||||
@@ -8,6 +8,7 @@ const log = (...args) => console.log(process.uptime().toFixed(3), ...args);
|
||||
|
||||
const client = new Discord.Client({
|
||||
shardCount: 2,
|
||||
intents: Discord.Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
client.on('debug', log);
|
||||
|
||||
@@ -5,7 +5,10 @@ const ytdl = require('ytdl-core');
|
||||
const auth = require('./auth.js');
|
||||
const Discord = require('../src');
|
||||
|
||||
const client = new Discord.Client({ partials: [] });
|
||||
const client = new Discord.Client({
|
||||
partials: [],
|
||||
intents: Discord.Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
client
|
||||
.login(auth.token)
|
||||
|
||||
@@ -7,7 +7,9 @@ const fetch = require('node-fetch');
|
||||
const { owner, token, webhookChannel, webhookToken } = require('./auth.js');
|
||||
const Discord = require('../src');
|
||||
|
||||
const client = new Discord.Client();
|
||||
const client = new Discord.Client({
|
||||
intents: Discord.Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
const fill = c => Array(4).fill(c.repeat(1000));
|
||||
const buffer = l => fetch(l).then(res => res.buffer());
|
||||
|
||||
Reference in New Issue
Block a user