Skip to content

Commit 7c173c9

Browse files
committed
Disallow mentions from webhook
1 parent 2c49da9 commit 7c173c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/kotlin/net/azisaba/guildchatdiscord/InterChatPacketListener.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.azisaba.guildchatdiscord
22

33
import dev.kord.common.entity.Snowflake
4+
import dev.kord.rest.builder.message.AllowedMentionsBuilder
45
import dev.kord.rest.request.RestRequestException
56
import dev.kord.rest.service.RestClient
67
import kotlinx.coroutines.runBlocking
@@ -44,6 +45,7 @@ object InterChatPacketListener : PacketListener {
4445
try {
4546
restClient.webhook.executeWebhook(Snowflake(webhookId.toULong()), webhookToken) {
4647
content = plainText
48+
allowedMentions = AllowedMentionsBuilder()
4749
}
4850
} catch (e: RestRequestException) {
4951
if (e.status.code == 404) {

0 commit comments

Comments
 (0)