Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
非同期で DiscordMessageReceiveEvent が呼び出されるバグの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
sya-ri committed May 31, 2020
1 parent 3701ae4 commit 16f2ce3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import me.syari.ss.core.Main.Companion.console
import me.syari.ss.core.auto.OnEnable
import me.syari.ss.core.config.CreateConfig.config
import me.syari.ss.core.config.dataType.ConfigDataType
import me.syari.ss.core.scheduler.CustomScheduler.run
import me.syari.ss.discord.Discord
import me.syari.ss.discord.Main.Companion.discordPlugin

Expand All @@ -13,7 +14,9 @@ object DiscordConnector: OnEnable {
val token = get("bot_token", ConfigDataType.STRING)
if(token != null){
Discord.init(token){ event ->
DiscordMessageReceiveEvent(event).callEvent()
run(discordPlugin){
DiscordMessageReceiveEvent(event).callEvent()
}
}
Discord.awaitReady()
}
Expand Down

0 comments on commit 16f2ce3

Please sign in to comment.