Advertisement
faking_fog

Untitled

Mar 23rd, 2021
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. const Discord = require('discord.js')
  2. const client = new Discord.Client();
  3.  
  4.  
  5. client.once('ready', () => {
  6. console.log('__ is online')
  7. });
  8.  
  9. const prefix = '!';
  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().toLocaleLowerCase();
  16.  
  17. if(command === 'ping'){
  18. message.channel.send('pong!');
  19. }
  20.  
  21. else if (command == 'who is the best?'){
  22. message.channel.send('fakingfog is the best!');
  23. }
  24. });
  25.  
  26. client.login('discord bot token here')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement