SHOW:
|
|
- or go back to the newest paste.
1 | const Discord = require('discord.js'); | |
2 | ||
3 | const client = new Discord.Client(); | |
4 | ||
5 | const prefix = '>'; | |
6 | ||
7 | client.once('ready', () => { | |
8 | console.log('Phenixxer is online!'); | |
9 | }); | |
10 | ||
11 | client.on('message', message => { | |
12 | if(!message.content.startsWith(prefix) || message.author.bot) return; | |
13 | ||
14 | const args = message.content.slice(prefix.length).split(/ +/); | |
15 | const command = args.shift().toLowerCase(); | |
16 | ||
17 | if(command === 'ping'){ | |
18 | - | message.channel.send('pong!') |
18 | + | client.commands.get('ping).execute(message, args); |
19 | } else if(command === 'youtube'){ | |
20 | - | message.channel.send('https://www.youtube.com/channel/UCHVAca-OHLlmf9GqFM3vBwQ') |
20 | + | client.commands.get('youtube').execute(message, args); |
21 | } | |
22 | }); | |
23 | ||
24 | ||
25 | ||
26 | client.login('ODA0ODcwNDEyOTYxNzEwMTEx.YBSn_A.hlw2t8UkQBEohwTRBh5G5pZJZFI'); |