Skip to content

Commit

Permalink
feat(embed): add embed for ping command
Browse files Browse the repository at this point in the history
  • Loading branch information
schmooky committed Sep 4, 2019
1 parent ae01e4f commit 157ac9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class YBot implements Bot {

this.commands = new BotCommandMap()
.on('ping', (cmd: ParsedMessage, msg: Message): void => {
msg.channel.send(embedPing(this.client));
msg.channel.send(embedPing(this.client.ping));
})
.on('help', help)
.on('join', join)
Expand Down
5 changes: 2 additions & 3 deletions src/core/BotEmbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ const embedMultipleTracksAdded = (tracks: MediaItem[]): RichEmbed => {
return embed;
};

const embedPing = (client: Client): RichEmbed => {
const embedPing = (ping: number): RichEmbed => {
const embed = new RichEmbed()
.setColor('#ffdb4d')
.setDescription(`⌛ ${Math.ceil(client.ping)}`)
.setFooter(copyright, logoYandexMusicURL);
.setDescription(`⌛ ${Math.ceil(ping)}`);

return embed;
};
Expand Down

0 comments on commit 157ac9f

Please sign in to comment.