Skip to content

Commit

Permalink
fix(merge): rollback merge
Browse files Browse the repository at this point in the history
  • Loading branch information
schmooky committed Sep 4, 2019
1 parent 19ef10e commit 4fc5879
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 5 additions & 2 deletions src/core/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import BotMediaPlayer from './BotMediaPlayer';
import BotConsoleReader from './BotConsoleReader';
import BotCommandMap from './BotCommandMap';
import { ParsedMessage, parse } from './BotCommandParser';
import { embedPing } from './BotEmbed';

import logger from '../utils/logger';

Expand Down Expand Up @@ -60,7 +59,11 @@ class YBot implements Bot {

this.commands = new BotCommandMap()
.on('ping', (cmd: ParsedMessage, msg: Message): void => {
msg.channel.send(embedPing(this.client));
let phrases = ['Can\'t stop won\'t stop!', ':ping_pong: Pong Bitch!'];

if (msg.guild) phrases = phrases.concat(msg.guild.emojis.array().map((x): string => x.name));

msg.channel.send(`${this.client.ping}ms, :${random(phrases)}:`);
})
.on('help', help)
.on('join', join)
Expand Down
12 changes: 1 addition & 11 deletions src/core/BotEmbed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RichEmbed, Client } from 'discord.js';
import { RichEmbed } from 'discord.js';

import { MediaItem } from './BotMedia';
import BotMediaQueue from './BotMediaQueue';
Expand Down Expand Up @@ -100,20 +100,10 @@ const embedMultipleTracksAdded = (tracks: MediaItem[]): RichEmbed => {
return embed;
};

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

return embed;
};

export {
embedTrackAdded,
embedNowPlaying,
embedList,
embedHelp,
embedMultipleTracksAdded,
embedPing,
};

0 comments on commit 4fc5879

Please sign in to comment.