com.github.insanusmokrassar.AutoPostTelegramBot.utils.commands.CommandPlugin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AutoPostTelegramBot Show documentation
Show all versions of AutoPostTelegramBot Show documentation
It is base library for creating smart bot for simple management of channels posts
package com.github.insanusmokrassar.AutoPostTelegramBot.utils.commands
import com.github.insanusmokrassar.AutoPostTelegramBot.base.models.FinalConfig
import com.github.insanusmokrassar.AutoPostTelegramBot.base.plugins.Plugin
import com.github.insanusmokrassar.AutoPostTelegramBot.base.plugins.PluginManager
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import java.lang.ref.WeakReference
abstract class CommandPlugin : Command(), Plugin {
protected var botWR: WeakReference? = null
override suspend fun onInit(
executor: RequestsExecutor,
baseConfig: FinalConfig,
pluginManager: PluginManager
) {
botWR = WeakReference(executor)
}
}