mirror of
https://github.com/HMCore/Orbot.git
synced 2025-12-12 22:06:23 +00:00
add fat jar compile mode
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
package de.wulkanat
|
||||
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonConfiguration
|
||||
import net.dv8tion.jda.api.EmbedBuilder
|
||||
@@ -24,7 +26,7 @@ object Admin {
|
||||
|
||||
admin = value?.retrieveUserById(userId)?.complete()
|
||||
if (admin == null) {
|
||||
kotlin.io.println("Connection to Admin failed!")
|
||||
kotlin.io.println("Connection to de.wulkanat.Admin failed!")
|
||||
} else {
|
||||
kotlin.io.println("Connected to ${admin!!.name}. No further errors will be printed here.")
|
||||
}
|
||||
@@ -86,7 +88,7 @@ object Admin {
|
||||
fun ready() {
|
||||
sendDevMessage(
|
||||
EmbedBuilder()
|
||||
.setTitle("Now watching for new Hytale Blogposts every ${updateMs/1000}s")
|
||||
.setTitle("Now watching for new Hytale Blogposts every ${updateMs / 1000}s")
|
||||
.setDescription(Channels.getServerNames().joinToString("\n"))
|
||||
.setColor(Color.GREEN)
|
||||
.build(),
|
||||
@@ -1,3 +1,5 @@
|
||||
package de.wulkanat
|
||||
|
||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent
|
||||
import net.dv8tion.jda.api.hooks.ListenerAdapter
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package de.wulkanat
|
||||
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonConfiguration
|
||||
import kotlinx.serialization.list
|
||||
@@ -82,6 +84,10 @@ object Channels {
|
||||
}
|
||||
|
||||
private fun saveChannels() {
|
||||
SERVERS_FILE.writeText(json.stringify(DiscordChannel.serializer().list, channels))
|
||||
SERVERS_FILE.writeText(
|
||||
json.stringify(
|
||||
DiscordChannel.serializer().list,
|
||||
channels
|
||||
))
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
import model.BlogPostPreview
|
||||
package de.wulkanat
|
||||
|
||||
import de.wulkanat.model.BlogPostPreview
|
||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent
|
||||
import net.dv8tion.jda.api.hooks.ListenerAdapter
|
||||
import web.SiteWatcher
|
||||
import de.wulkanat.web.SiteWatcher
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class Cli : ListenerAdapter() {
|
||||
@@ -1,3 +1,5 @@
|
||||
package de.wulkanat
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import java.io.File
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package de.wulkanat
|
||||
|
||||
import net.dv8tion.jda.api.JDABuilder
|
||||
import net.dv8tion.jda.api.entities.Activity
|
||||
import net.dv8tion.jda.api.requests.GatewayIntent
|
||||
import web.SiteWatcher
|
||||
import de.wulkanat.web.SiteWatcher
|
||||
import kotlin.concurrent.timer
|
||||
|
||||
fun main() {
|
||||
// TODO: move toke into file
|
||||
val builder = JDABuilder.createLight(Admin.token,
|
||||
val builder = JDABuilder.createLight(
|
||||
Admin.token,
|
||||
GatewayIntent.GUILD_MESSAGES, GatewayIntent.DIRECT_MESSAGES)
|
||||
.addEventListeners(Bot())
|
||||
.setActivity(Activity.watching("for new Blogposts"))
|
||||
@@ -1,4 +1,4 @@
|
||||
package extensions
|
||||
package de.wulkanat.extensions
|
||||
|
||||
import java.awt.Color
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package model
|
||||
package de.wulkanat.model
|
||||
|
||||
import net.dv8tion.jda.api.EmbedBuilder
|
||||
import net.dv8tion.jda.api.entities.MessageEmbed
|
||||
import extensions.hex2Rgb
|
||||
import de.wulkanat.extensions.hex2Rgb
|
||||
|
||||
data class BlogPostPreview(
|
||||
val title: String,
|
||||
@@ -1,6 +1,6 @@
|
||||
package web
|
||||
package de.wulkanat.web
|
||||
|
||||
import model.BlogPostPreview
|
||||
import de.wulkanat.model.BlogPostPreview
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package web
|
||||
package de.wulkanat.web
|
||||
|
||||
import model.BlogPostPreview
|
||||
import de.wulkanat.Admin
|
||||
import de.wulkanat.model.BlogPostPreview
|
||||
import org.jsoup.Jsoup
|
||||
import java.io.IOException
|
||||
|
||||
Reference in New Issue
Block a user