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:
Gus Caplan
2016-09-19 13:56:52 -05:00
committed by Schuyler Cebulskie
parent 7957bc82cd
commit e0b614c3b2
2 changed files with 14 additions and 1 deletions

View File

@@ -19,6 +19,19 @@ class ReadyHandler extends AbstractHandler {
if (!client.user.bot) client.setInterval(client.syncGuilds.bind(client), 30000);
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(() => {
if (!client.ws.normalReady) client.ws._emitReady(false);
}, 1200 * data.guilds.length);

View File

@@ -82,7 +82,7 @@ const Endpoints = exports.Endpoints = {
// users
user: (userID) => `${API}/users/${userID}`,
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`,
meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`,