chore: move obj
This commit is contained in:
2 files changed
+61
-41
No files matched your search
@@ -7,11 +7,31 @@
|
|||||||
|
|
||||||
package cn.rtast.fancybot
|
package cn.rtast.fancybot
|
||||||
|
|
||||||
|
import cn.rtast.fancybot.commands.AboutCommand
|
||||||
|
import cn.rtast.fancybot.commands.EchoCommand
|
||||||
|
import cn.rtast.fancybot.commands.HelpCommand
|
||||||
|
import cn.rtast.fancybot.commands.StatusCommand
|
||||||
|
import cn.rtast.fancybot.commands.lookup.*
|
||||||
|
import cn.rtast.fancybot.commands.misc.*
|
||||||
|
import cn.rtast.fancybot.commands.niuzi.*
|
||||||
|
import cn.rtast.fancybot.commands.parse.AsciiArtCommand
|
||||||
|
import cn.rtast.fancybot.commands.parse.ReverseGIFCommand
|
||||||
|
import cn.rtast.fancybot.commands.record.JrrpCommand
|
||||||
|
import cn.rtast.fancybot.commands.record.RedeemCommand
|
||||||
|
import cn.rtast.fancybot.commands.record.ShortLinkCommand
|
||||||
import cn.rtast.fancybot.entity.Config
|
import cn.rtast.fancybot.entity.Config
|
||||||
import cn.rtast.fancybot.entity.enums.ImageType
|
import cn.rtast.fancybot.entity.enums.ImageType
|
||||||
import cn.rtast.fancybot.entity.enums.WSType
|
import cn.rtast.fancybot.entity.enums.WSType
|
||||||
|
import cn.rtast.fancybot.items.BaisiItem
|
||||||
|
import cn.rtast.fancybot.items.HeisiItem
|
||||||
|
import cn.rtast.fancybot.items.SetuItem
|
||||||
|
import cn.rtast.fancybot.util.file.ConfigManager
|
||||||
|
import cn.rtast.fancybot.util.file.NiuziBankManager
|
||||||
|
import cn.rtast.fancybot.util.file.NiuziManager
|
||||||
|
import cn.rtast.fancybot.util.item.ItemManager
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
|
import java.time.Instant
|
||||||
|
|
||||||
val gson: Gson = GsonBuilder()
|
val gson: Gson = GsonBuilder()
|
||||||
.setPrettyPrinting()
|
.setPrettyPrinting()
|
||||||
@@ -40,3 +60,43 @@ val DEFAULT_CONFIG = Config(
|
|||||||
admins = listOf(3458671395L),
|
admins = listOf(3458671395L),
|
||||||
enableAntiRevoke = true
|
enableAntiRevoke = true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val configManager = ConfigManager()
|
||||||
|
val itemManager = ItemManager()
|
||||||
|
val niuziManager = NiuziManager()
|
||||||
|
val niuziBankManager = NiuziBankManager()
|
||||||
|
|
||||||
|
val items = listOf(
|
||||||
|
HeisiItem(),
|
||||||
|
BaisiItem(),
|
||||||
|
SetuItem()
|
||||||
|
)
|
||||||
|
|
||||||
|
val commands = listOf(
|
||||||
|
EchoCommand(), JrrpCommand(),
|
||||||
|
RedeemCommand(), HitokotoCommand(),
|
||||||
|
FKXQSCommand(), QRCodeCommand(),
|
||||||
|
AntiRevokeCommand(), MCPingCommand(),
|
||||||
|
WeatherCommand(), CigaretteCommand(),
|
||||||
|
RemakeCommand(), PixivCommand(),
|
||||||
|
RUACommand(), NslookupCommand(),
|
||||||
|
CompilerCommand(), AICommand(),
|
||||||
|
GithubUserCommand(), AboutCommand(),
|
||||||
|
MusicPlayUrlCommand(), DomainPriceCommand(),
|
||||||
|
SendMailCommand(), ZiBiCommand(),
|
||||||
|
UnsetZiBiCommand(), WikipediaCommand(),
|
||||||
|
AsciiArtCommand(), StatusCommand(),
|
||||||
|
JueCommand(), ShortLinkCommand(),
|
||||||
|
TenSetuCommand(), ShotSelfCommand(),
|
||||||
|
ShotOtherCommand(), ReverseGIFCommand(),
|
||||||
|
HelpCommand(), MusicCommand(),
|
||||||
|
LikeMeCommand(), NiuziTransferCommand(),
|
||||||
|
NiuziSignCommand(), NiuziJiJianCommand(),
|
||||||
|
NiuziQueryCommand(), MyNiuziCommand(),
|
||||||
|
NiuziBankCommand(), WithdrawCommand(),
|
||||||
|
BankTransferCommand(), CreateBankAccountCommand(),
|
||||||
|
BankBalanceCommand(), DepositCommand(),
|
||||||
|
DMSearchCommand()
|
||||||
|
)
|
||||||
|
|
||||||
|
val START_UP_TIME = Instant.now().epochSecond
|
||||||
@@ -165,46 +165,6 @@ class FancyBot : OneBotListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val configManager = ConfigManager()
|
|
||||||
val itemManager = ItemManager()
|
|
||||||
val niuziManager = NiuziManager()
|
|
||||||
val niuziBankManager = NiuziBankManager()
|
|
||||||
|
|
||||||
val items = listOf(
|
|
||||||
HeisiItem(),
|
|
||||||
BaisiItem(),
|
|
||||||
SetuItem()
|
|
||||||
)
|
|
||||||
|
|
||||||
val commands = listOf(
|
|
||||||
EchoCommand(), JrrpCommand(),
|
|
||||||
RedeemCommand(), HitokotoCommand(),
|
|
||||||
FKXQSCommand(), QRCodeCommand(),
|
|
||||||
AntiRevokeCommand(), MCPingCommand(),
|
|
||||||
WeatherCommand(), CigaretteCommand(),
|
|
||||||
RemakeCommand(), PixivCommand(),
|
|
||||||
RUACommand(), NslookupCommand(),
|
|
||||||
CompilerCommand(), AICommand(),
|
|
||||||
GithubUserCommand(), AboutCommand(),
|
|
||||||
MusicPlayUrlCommand(), DomainPriceCommand(),
|
|
||||||
SendMailCommand(), ZiBiCommand(),
|
|
||||||
UnsetZiBiCommand(), WikipediaCommand(),
|
|
||||||
AsciiArtCommand(), StatusCommand(),
|
|
||||||
JueCommand(), ShortLinkCommand(),
|
|
||||||
TenSetuCommand(), ShotSelfCommand(),
|
|
||||||
ShotOtherCommand(), ReverseGIFCommand(),
|
|
||||||
HelpCommand(), MusicCommand(),
|
|
||||||
LikeMeCommand(), NiuziTransferCommand(),
|
|
||||||
NiuziSignCommand(), NiuziJiJianCommand(),
|
|
||||||
NiuziQueryCommand(), MyNiuziCommand(),
|
|
||||||
NiuziBankCommand(), WithdrawCommand(),
|
|
||||||
BankTransferCommand(), CreateBankAccountCommand(),
|
|
||||||
BankBalanceCommand(), DepositCommand(),
|
|
||||||
DMSearchCommand()
|
|
||||||
)
|
|
||||||
|
|
||||||
val START_UP_TIME = Instant.now().epochSecond
|
|
||||||
|
|
||||||
fun initFilesDir() {
|
fun initFilesDir() {
|
||||||
File("./files/images").also { it.mkdirs() }
|
File("./files/images").also { it.mkdirs() }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user