View difference between Paste ID: 45ShKpi0 and fxeD5gdg
SHOW: | | - or go back to the newest paste.
1
var input = message.getContent()
2
var userStr = input
3
if(input.contains(" ")) {
4
    userStr = input.split(" ")[0]
5
}
6
message.getChannel().message("`"+userStr+"`")
7
8
var toBan = guild.getUser(input.contains(" ") ? input.split(" ")[0] : input)
9
if (toBan === null) {
10
    message.getChannel().message("Please mention a user!")
11
    return
12
}
13
14
var banReqChannelId = "558940248877563924"
15
var channel = guild.getTextChannel(banReqChannelId)
16
17
var embed = embeds.newEmbed()
18
embed.setTitle("Ban Request");
19
embed.addField("User to ban", toBan.getName(), false)
20
embed.addField("User requesting", user.getName(), false)
21
22
channel.message(embed.build())