Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. const Discord = require('discord.js');
  2. const Client = new Discord.Client()
  3.  
  4. Client.login("YOUR TOKEN GOES HERE").then(async () => {
  5. console.log(`Ligado em ${Client.user.tag}`)
  6. })
  7.  
  8. Client.on('message', async message => {
  9. if (message.author.id === 'YOUR USER ID GOES HERE') {
  10. let prefix = '!'
  11. const args = message.content.slice(prefix.length).trim().split(' ')
  12. if (message.content.startsWith(`${prefix}avatar`)) {
  13. Client.user.setAvatar(args[1]).then(async () => {
  14. await message.reply(Client.user.displayAvatarURL)
  15. })
  16. }
  17. }
  18. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement