Teerathornmoon3

Discord.js Starter

Jan 26th, 2021 (edited)
1,754
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js')
  2. const client = new Discord.Client()
  3. const config = require('./config.json')
  4. const fs = require('fs')
  5.  
  6. client.on('ready', () => {
  7.   console.log(`Loggin in as ${client.user.tag}!`);
  8. });
  9.  
  10. client.on('message',async message => {
  11.   const args = message.content.slice(config.Prefix.length).trim().split(/ +/g);
  12.   const command = args.shift().toLowerCase();
  13.  
  14.   if (command == 'test') {
  15.     message.reply('Hello')
  16.   }
  17. });
  18.  
  19. client.login(config.Token);
Add Comment
Please, Sign In to add comment