File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/src/main/kotlin/com/github/livingwithhippos/unchained_bot Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class BotApplication : KoinComponent {
8989 private val torrentsCommandFilter = Filter .Custom { text?.startsWith(" /torrents" ) ? : false }
9090 private val downloadsCommandFilter = Filter .Custom { (text?.startsWith(" /downloads" ) ? : false ) }
9191
92- init {
92+ fun startBot () {
9393
9494 if (botToken.length > 40 )
9595 println (" Found Telegram Bot Token" )
@@ -192,7 +192,8 @@ class BotApplication : KoinComponent {
192192 scope.launch {
193193 val downloadItem = unrestrictLink(args)
194194 if (downloadItem != null ) {
195- val itemMessage: String = formatDownloadItem(downloadItem, allowTranscoding = true )
195+ val itemMessage: String =
196+ formatDownloadItem(downloadItem, allowTranscoding = true )
196197
197198 bot.sendMessage(
198199 chatId = ChatId .fromId(message.chat.id),
Original file line number Diff line number Diff line change @@ -29,4 +29,5 @@ fun main(args: Array<String>) {
2929 }
3030
3131 val botApp = BotApplication ()
32+ botApp.startBot()
3233}
You can’t perform that action at this time.
0 commit comments