feat: add scheduler to send like
This commit is contained in:
3 files changed
+14
-2
No files matched your search
@@ -1,13 +1,13 @@
|
|||||||
[versions]
|
[versions]
|
||||||
kotlinVersion = "2.0.10"
|
kotlinVersion = "2.0.10"
|
||||||
ronebotVersion = "1.12.7"
|
ronebotVersion = "1.12.8"
|
||||||
shadowVersion = "8.3.0"
|
shadowVersion = "8.3.0"
|
||||||
okhttpVersion = "5.0.0-alpha.14"
|
okhttpVersion = "5.0.0-alpha.14"
|
||||||
exposedVersion = "0.53.0"
|
exposedVersion = "0.53.0"
|
||||||
sqliteJDBCVersion = "3.46.1.0"
|
sqliteJDBCVersion = "3.46.1.0"
|
||||||
motdPingerVersion = "1.1.2"
|
motdPingerVersion = "1.1.2"
|
||||||
animatedGifLibVersion = "1.4"
|
animatedGifLibVersion = "1.4"
|
||||||
simpleJavaMailVersion = "8.12.1"
|
simpleJavaMailVersion = "8.12.2"
|
||||||
jsoupVersion = "1.18.1"
|
jsoupVersion = "1.18.1"
|
||||||
nashornVersion = "15.4"
|
nashornVersion = "15.4"
|
||||||
zxingVersion = "3.5.3"
|
zxingVersion = "3.5.3"
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import cn.rtast.fancybot.util.file.ConfigManager
|
|||||||
import cn.rtast.fancybot.util.file.NiuziBankManager
|
import cn.rtast.fancybot.util.file.NiuziBankManager
|
||||||
import cn.rtast.fancybot.util.file.NiuziManager
|
import cn.rtast.fancybot.util.file.NiuziManager
|
||||||
import cn.rtast.fancybot.util.item.ItemManager
|
import cn.rtast.fancybot.util.item.ItemManager
|
||||||
|
import cn.rtast.rob.ROneBotFactory
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
@@ -79,6 +80,14 @@ val items = listOf(
|
|||||||
TenSetuItem(), TenSetuR18Item()
|
TenSetuItem(), TenSetuR18Item()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val tasks = mapOf(
|
||||||
|
10000000L to suspend {
|
||||||
|
configManager.admins.forEach {
|
||||||
|
ROneBotFactory.action.sendLike(it, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
val commands = listOf(
|
val commands = listOf(
|
||||||
EchoCommand(), JrrpCommand(),
|
EchoCommand(), JrrpCommand(),
|
||||||
NiuziRedeemCommand(), HitokotoCommand(),
|
NiuziRedeemCommand(), HitokotoCommand(),
|
||||||
|
|||||||
@@ -163,4 +163,7 @@ suspend fun main() {
|
|||||||
val commandManager = rob.commandManager
|
val commandManager = rob.commandManager
|
||||||
commands.forEach { commandManager.register(it) }
|
commands.forEach { commandManager.register(it) }
|
||||||
items.forEach { itemManager.register(it) }
|
items.forEach { itemManager.register(it) }
|
||||||
|
tasks.forEach {
|
||||||
|
rob.scheduler.scheduleTask(it.value, 1000L, it.key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user