mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
weee add clyde because we all love clyde (#716)
* update to work with clyde's avatar image ;) * add clyde to user cache on ready * Update Ready.js * Update Ready.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
7957bc82cd
commit
e0b614c3b2
@@ -19,6 +19,19 @@ class ReadyHandler extends AbstractHandler {
|
|||||||
if (!client.user.bot) client.setInterval(client.syncGuilds.bind(client), 30000);
|
if (!client.user.bot) client.setInterval(client.syncGuilds.bind(client), 30000);
|
||||||
client.once('ready', client.syncGuilds.bind(client));
|
client.once('ready', client.syncGuilds.bind(client));
|
||||||
|
|
||||||
|
if (!client.users.has('1')) {
|
||||||
|
client.dataManager.newUser({
|
||||||
|
id: '1',
|
||||||
|
username: 'Clyde',
|
||||||
|
discriminator: '0000',
|
||||||
|
avatar: 'https://discordapp.com/assets/f78426a064bc9dd24847519259bc42af.png',
|
||||||
|
bot: true,
|
||||||
|
status: 'online',
|
||||||
|
game: null,
|
||||||
|
verified: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
client.setTimeout(() => {
|
client.setTimeout(() => {
|
||||||
if (!client.ws.normalReady) client.ws._emitReady(false);
|
if (!client.ws.normalReady) client.ws._emitReady(false);
|
||||||
}, 1200 * data.guilds.length);
|
}, 1200 * data.guilds.length);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const Endpoints = exports.Endpoints = {
|
|||||||
// users
|
// users
|
||||||
user: (userID) => `${API}/users/${userID}`,
|
user: (userID) => `${API}/users/${userID}`,
|
||||||
userChannels: (userID) => `${Endpoints.user(userID)}/channels`,
|
userChannels: (userID) => `${Endpoints.user(userID)}/channels`,
|
||||||
avatar: (userID, avatar) => `${Endpoints.user(userID)}/avatars/${avatar}.jpg`,
|
avatar: (userID, avatar) => userID === '1' ? avatar : `${Endpoints.user(userID)}/avatars/${avatar}.jpg`,
|
||||||
me: `${API}/users/@me`,
|
me: `${API}/users/@me`,
|
||||||
meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`,
|
meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user