Add fraud response
This commit is contained in:
parent
1b182f75ab
commit
eb23d5871a
|
@ -2,6 +2,7 @@ plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'org.jetbrains.kotlin.jvm' version '1.2.71'
|
id 'org.jetbrains.kotlin.jvm' version '1.2.71'
|
||||||
id 'com.github.johnrengelman.shadow' version '4.0.1'
|
id 'com.github.johnrengelman.shadow' version '4.0.1'
|
||||||
|
id 'com.sedmelluq.jdaction' version '1.0.2'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,12 @@ import net.dv8tion.jda.core.hooks.ListenerAdapter
|
||||||
|
|
||||||
object Events : ListenerAdapter() {
|
object Events : ListenerAdapter() {
|
||||||
override fun onMessageReceived(event: MessageReceivedEvent) {
|
override fun onMessageReceived(event: MessageReceivedEvent) {
|
||||||
if (event.message.channel.idLong == 499628388659625995)
|
if (event.message.contentStripped.toLowerCase().contains("fraud")) {
|
||||||
|
val e = event.message.guild.getEmotesByName("fr00d", true).firstOrNull()
|
||||||
|
if (e != null)
|
||||||
|
event.message.addReaction(e).queue()
|
||||||
|
}
|
||||||
|
if (event.message.channel.idLong == 499628388659625995) {
|
||||||
if (event.message.mentionedMembers.contains(event.guild.getMember(event.jda.selfUser))) {
|
if (event.message.mentionedMembers.contains(event.guild.getMember(event.jda.selfUser))) {
|
||||||
if (event.message.contentStripped.toLowerCase().contains("hello")) {
|
if (event.message.contentStripped.toLowerCase().contains("hello")) {
|
||||||
|
|
||||||
|
@ -20,5 +25,6 @@ object Events : ListenerAdapter() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue