Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const Client = new Discord.Client()
- Client.login("YOUR TOKEN GOES HERE").then(async () => {
- console.log(`Ligado em ${Client.user.tag}`)
- })
- Client.on('message', async message => {
- if (message.author.id === 'YOUR USER ID GOES HERE') {
- let prefix = '!'
- const args = message.content.slice(prefix.length).trim().split(' ')
- if (message.content.startsWith(`${prefix}avatar`)) {
- Client.user.setAvatar(args[1]).then(async () => {
- await message.reply(Client.user.displayAvatarURL)
- })
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement