Add fraud response

This commit is contained in:
Julius de Jeu 2018-10-11 00:06:26 +02:00
parent 1b182f75ab
commit eb23d5871a
2 changed files with 8 additions and 1 deletions

View file

@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.2.71'
id 'com.github.johnrengelman.shadow' version '4.0.1'
id 'com.sedmelluq.jdaction' version '1.0.2'
}

View file

@ -5,7 +5,12 @@ import net.dv8tion.jda.core.hooks.ListenerAdapter
object Events : ListenerAdapter() {
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.contentStripped.toLowerCase().contains("hello")) {
@ -22,3 +27,4 @@ object Events : ListenerAdapter() {
}
}
}
}