mirror of
https://github.com/HMCore/Orbot.git
synced 2025-12-10 21:06:18 +00:00
twitter gods dont cancel me pls
This commit is contained in:
16
.idea/workspace.xml
generated
16
.idea/workspace.xml
generated
@@ -4,8 +4,10 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="1aabf22b-2f57-46ac-9973-367d8668ffd3" name="Default Changelist" comment="Update Json Serialization">
|
||||
<change beforePath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/Channels.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/Channels.kt" afterDir="false" />
|
||||
<list default="true" id="1aabf22b-2f57-46ac-9973-367d8668ffd3" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/Admin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/Admin.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/AdminCli.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/AdminCli.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/Main.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/kotlin/de/wulkanat/Main.kt" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@@ -90,7 +92,7 @@
|
||||
<recent name="E:\Projects\Kotlin_Proj\HytaleUpdateBot\src\main\kotlin\de\wulkanat" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="Gradle.HytaleUpdateBot [build]">
|
||||
<component name="RunManager" selected="Kotlin.Main">
|
||||
<configuration name="HytaleUpdateBot [build]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
@@ -158,8 +160,8 @@
|
||||
<option name="JAR_PATH" value="$PROJECT_DIR$/build/libs/HytaleUpdateBot-all-1.0-SNAPSHOT.jar" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="MainKt" type="JetRunConfigurationType" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="de.wulkanat.MainKt" />
|
||||
<configuration name="Main" type="JetRunConfigurationType" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="de.wulkanat.Main" />
|
||||
<module name="HytaleUpdateBot.main" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
@@ -167,6 +169,7 @@
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Kotlin.Main" />
|
||||
<item itemvalue="Gradle.HytaleUpdateBot [fatJar]" />
|
||||
<item itemvalue="Gradle.HytaleUpdateBot [build]" />
|
||||
<item itemvalue="Gradle.HytaleUpdateBot [clean]" />
|
||||
@@ -259,4 +262,7 @@
|
||||
</configuration>
|
||||
</watches-manager>
|
||||
</component>
|
||||
<component name="se.expertsystem.intellij.aop.aspectj.AspectJProjectComponent">
|
||||
<setting name="isActivated" value="false" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -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