mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add ClientOptions.restTimeOffset for better performance for bots with a good network connection
This commit is contained in:
@@ -117,10 +117,15 @@ client.on('message', message => {
|
||||
|
||||
if (message.content === 'ratelimittest') {
|
||||
let i = 1;
|
||||
const start = Date.now();
|
||||
while (i <= 20) {
|
||||
message.channel.sendMessage(`Testing my rates, item ${i} of 20`);
|
||||
i++;
|
||||
}
|
||||
message.channel.sendMessage('last one...').then(m => {
|
||||
const diff = Date.now() - start;
|
||||
m.reply(`Each message took ${diff / 21}ms to send`);
|
||||
});
|
||||
}
|
||||
|
||||
if (message.content === 'makerole') {
|
||||
|
||||
Reference in New Issue
Block a user