-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.js
More file actions
32 lines (21 loc) · 901 Bytes
/
bot.js
File metadata and controls
32 lines (21 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require('dotenv').config()
const Discord = require('discord.js')
const client = new Discord.Client();
client.login(process.env.BOTTOKEN)
client.on('ready', () =>{
console.log('bot is on bby')
})
const prefix = "!stop"
client.on('message', (message)=>{
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(' ')
if(args.length != 1)
return message.channel.send(`You fucked up the arguments, ${message.author}!`)
const member = message.mentions.users.first()
const guildMember = message.guild.member(member)
guildMember.roles.set(['791018349559676958']) //set the poopy head role
return message.channel.send(
`Hold it right there, ${member}`,
new Discord.MessageAttachment("https://image.shutterstock.com/z/stock-photo-police-officer-369187457.jpg")
)
})