mirror of
https://github.com/HMCore/Orbot.git
synced 2025-12-12 13:56:18 +00:00
twitter gods dont cancel me pls
This commit is contained in:
@@ -36,7 +36,7 @@ public class TwitterJob implements Job {
|
||||
if(!lastTweetID.equalsIgnoreCase(tweetID)) {
|
||||
lastTweetID = tweetID;
|
||||
|
||||
Channels.INSTANCE.sentToAll(new MessageBuilder().append(" You got mail! <:blobmail:817758108503769130> https://twitter.com/Hytale/status/").append(tweetID).build());
|
||||
Channels.INSTANCE.sentToAll(new MessageBuilder().append("https://twitter.com/Hytale/status/").append(tweetID).build());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ object Admin {
|
||||
|
||||
fun connectToUser() {
|
||||
Main.jdas.forEach {
|
||||
admin ?: return;
|
||||
if(admin != null) return@forEach
|
||||
admin = it.retrieveUserById(userId).complete()
|
||||
}
|
||||
if (admin == null) {
|
||||
@@ -122,6 +122,8 @@ object Admin {
|
||||
}
|
||||
|
||||
fun sendDevMessage(messageEmbed: MessageEmbed, fallback: String) {
|
||||
kotlin.io.println(admin!!.id)
|
||||
|
||||
val devChannel = admin?.openPrivateChannel() ?: kotlin.run {
|
||||
kotlin.io.println(fallback)
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.dv8tion.jda.api.hooks.ListenerAdapter
|
||||
import de.wulkanat.web.SiteWatcher
|
||||
import net.dv8tion.jda.api.EmbedBuilder
|
||||
import net.dv8tion.jda.api.events.message.priv.PrivateMessageReceivedEvent
|
||||
import org.hmcore.TwitterJob
|
||||
import java.awt.Color
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
@@ -32,6 +33,8 @@ class AdminCli : ListenerAdapter() {
|
||||
description = "Lorem Ipsum"
|
||||
)
|
||||
|
||||
TwitterJob.lastTweetID = "poggers"
|
||||
|
||||
Admin.println("Posting on next update cycle.")
|
||||
}
|
||||
"info" -> {
|
||||
|
||||
@@ -35,22 +35,20 @@ object Main {
|
||||
|
||||
for (i in 0 until 6) {
|
||||
try {
|
||||
var jda = builder.useSharding(i, 6)
|
||||
.build()
|
||||
jda.addEventListener(AdminCli())
|
||||
jda.addEventListener(ErrorHandler())
|
||||
jda.addEventListener(OwnerCli())
|
||||
jda.awaitReady()
|
||||
jdas.add(
|
||||
builder.useSharding(i, 6)
|
||||
.build()
|
||||
jda
|
||||
)
|
||||
} catch (loginException: LoginException) {
|
||||
println("!!! Shard $i could not login !!!")
|
||||
}
|
||||
}
|
||||
|
||||
val jda = builder.build()
|
||||
|
||||
jda.addEventListener(AdminCli())
|
||||
jda.addEventListener(ErrorHandler())
|
||||
jda.addEventListener(OwnerCli())
|
||||
jda.awaitReady()
|
||||
|
||||
Admin.connectToUser()
|
||||
|
||||
Admin.info()
|
||||
|
||||
Reference in New Issue
Block a user