This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mrpowergamerbr.loritta.utils.oauth2 | |
import com.github.kevinsawicki.http.HttpRequest | |
import com.github.salomonbrys.kotson.fromJson | |
import com.github.salomonbrys.kotson.long | |
import com.github.salomonbrys.kotson.obj | |
import com.github.salomonbrys.kotson.string | |
import com.google.gson.Gson | |
import com.google.gson.JsonElement | |
import com.google.gson.JsonObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.dv8tion.jda.core.AccountType | |
import net.dv8tion.jda.core.JDABuilder | |
import java.io.File | |
import net.dv8tion.jda.core.WebSocketCode | |
import net.dv8tion.jda.core.entities.impl.JDAImpl | |
import org.json.JSONObject | |
fun main(args: Array<String>) { | |
val token = File("D:\\discord_token.txt").readText() | |
val jda = JDABuilder(AccountType.CLIENT).setToken(token).buildBlocking() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mrpowergamerbr.akinator | |
import com.github.kevinsawicki.http.HttpRequest | |
import com.github.salomonbrys.kotson.array | |
import com.github.salomonbrys.kotson.get | |
import com.github.salomonbrys.kotson.int | |
import com.github.salomonbrys.kotson.long | |
import com.github.salomonbrys.kotson.obj | |
import com.github.salomonbrys.kotson.string | |
import com.google.gson.JsonParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mrpowergamerbr.loritta.utils | |
val morseValues = mapOf( | |
// ALFABETO | |
'A' to ".-", | |
'B' to "-...", | |
'C' to "-.-.", | |
'D' to "-..", | |
'E' to ".", | |
'F' to "..-.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"currentUserInfo":{ | |
"notificationsCount":1, | |
"unreadChatThreadsCount":0, | |
"userProfile":{ | |
"status":0, | |
"itemsCount":0, | |
"consecutiveCheckInDays":null, | |
"uid":"cd481edf-231f-42f2-bf2b-256fde90ef54", | |
"modifiedTime":"2017-06-25T22:57:51Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"api:statuscode":0, | |
"api:duration":"0.004s", | |
"api:message":"OK", | |
"communityList":[ | |
{ | |
"status":0, | |
"endpoint":"star-vs-as-forcas-do-mal-pt-br", | |
"name":"Star Vs As For\u00e7as Do Mal PT/BR", | |
"modifiedTime":"2016-11-01T01:04:54Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var json = pegarConteúdoDeUmaURL("https://mcapi.ca/query/jogar.sparklypower.net/players"); // Pegar o texto em JSON | |
var obj = JSON.parse(json); | |
var online = obj.players.online; | |
var max = obj.players.max; | |
contexto.responder("**" + online + "**/**" + max + " ** players online no SparklyPower! 🎉"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TempoParaEsperar: 15 # Em segundos, deixe em 0 para desativar | |
TempoParaExpirar: 120 # Em segundos, deixe em 0 para desativar | |
TeletransporteSeguro: true | |
Mensagens: | |
EspereSegundos: "&cVocê precisa esperar {segundos} segundos antes de poder enviar outro pedido!" | |
NaoExisteOuOffline: "&c{player} está offline!" | |
MesmoPlayer: "&cVocê não pode enviar um pedido para si mesmo!" | |
JaEnviou: "&cVocê já enviou um pedido de teletransporte para {pedido}" | |
EnviadoComSucesso: "&aPedido enviado com sucesso!" | |
Aceitar: "&a&lCLIQUE AQUI" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mrpowergamerbr.loritta.utils; | |
import java.awt.FontMetrics; | |
import java.awt.Graphics; | |
public class ImageUtils { | |
/** | |
* Escreve um texto em um Graphics, fazendo wrap caso necessário | |
* @param text Texto | |
* @param startX X inicial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. First, you spawn an armor stand | |
2. Then you spawn an shulker | |
3. Make the shulker ride the armor stand | |
4. Spawn another armor stand in the same location as the previous armor stand | |
5. Spawn a falling block | |
6. Make the falling block ride the previous armor stand | |
7. Success! | |
TL;DR: Armor Stands |