Simo_246

discord csgo status bot

Jul 3rd, 2020
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. //dependencies
  2. const Discord = require('discord.js');
  3. const bot = new Discord.Client();
  4. const token = 'token';
  5. const PREFIX = '!';
  6. var status = "";
  7.  
  8. //console message
  9. bot.on('ready', () =>
  10. {
  11. console.log('This bot is online!');
  12. }),
  13.  
  14. //bot message
  15. bot.on('message', message =>{
  16. let args = message.content.substring(PREFIX.length).split(' ')
  17. switch(args[0]){
  18. case '246':
  19. message.channel.send({embed: {
  20. color: '#008000',
  21. title: "*246 CSGO Server*",
  22. description: "Service by Simo_246",
  23.  
  24. thumbnail: {
  25. url: 'https://i.imgur.com/ZcHqQvd.png',
  26. },
  27. fields: [{
  28. name: "*Let's Play!*",
  29. value: "steam://connect/ip:gameport/password",
  30. },
  31. //gotv if enabled
  32. {
  33. name: "*Watch GOTV!*",
  34. value: "steam://connect/ip:gotvport/password",
  35. },
  36.  
  37. ],
  38. timestamp: new Date(),
  39. footer: {
  40. icon_url: "https://i.imgur.com/ZcHqQvd.png",
  41. text: "PGL Industries - Copyright 2001-2246"
  42. }
  43. }
  44. })
  45. }
  46. }
  47. )
  48.  
  49. //login (always at the end)
  50. bot.login(token);
Add Comment
Please, Sign In to add comment