diff --git a/src/main/kotlin/moe/nikky/RoleManagementExtension.kt b/src/main/kotlin/moe/nikky/RoleManagementExtension.kt index 7bb52b1..56ed3f9 100644 --- a/src/main/kotlin/moe/nikky/RoleManagementExtension.kt +++ b/src/main/kotlin/moe/nikky/RoleManagementExtension.kt @@ -515,8 +515,9 @@ class RoleManagementExtension : Extension(), Klogging { } try { roleMapping.forEach { entry -> - val reactionEmoji = entry.reactionEmoji(guild) + val reactionEmoji: ReactionEmoji = entry.reactionEmoji(guild) val role = entry.getRole(guild) + logger.traceF { "adding reaction $reactionEmoji for role ${role.name}" } message.addReaction(reactionEmoji) val reactors = message.getReactors(reactionEmoji) reactors.map { it.asMemberOrNull(guild.id) } @@ -557,6 +558,11 @@ class RoleManagementExtension : Extension(), Klogging { channel as? TextChannel ?: relayError("${channel.mention} is not a Text Channel") } + val reaction = arguments.reaction + if(reaction is ReactionEmoji.Custom && reaction.isAnimated) { + relayError("animated emojis are not supported") + } + val configUnit = guild.config() val (key, roleChooserConfig) = configUnit.get()?.find(arguments.section, channel.id) ?: run {