This file contains hidden or 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
| PROXY=false | |
| download_server_jar() { | |
| local prefix="https://papermc.io/api/v2/projects" | |
| local project="paper" | |
| if [ "$PROXY" = "true" ]; then | |
| project="waterfall" | |
| fi |
This file contains hidden or 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
| public class ActionBar { | |
| public void sendTitle(Audience target, String input) { | |
| Component mainTitle = C.c(input); | |
| Title title = Title.title(mainTitle, (Component)Component.empty()); | |
| target.showTitle(title); | |
| } | |
| public void sendSubtitle(Audience target, String input) { | |
| Component subTitle = C.c(input); |
This file contains hidden or 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 your.class.your.packages; | |
| import net.kyori.adventure.text.Component; | |
| import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; | |
| public class C { | |
| public static Component c(String input) { | |
| return (Component)LegacyComponentSerializer.legacy('&').deserialize(input); | |
| } | |
| } |
This file contains hidden or 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
| // works with discord.js. | |
| // you can literally just prolly throw this into your commands folder with a folder called captcha in it | |
| // and it would just work right off the bat. | |
| // ~Phil | |
| const svgCaptcha = require('svg-captcha'); | |
| const svgToImg = require("svg-to-img"); | |
| const fs = require('fs'); | |
| var captcha = svgCaptcha.create(); |
This file contains hidden or 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
| const Discord = require("discord.js"); | |
| const Enmap = require("enmap"); | |
| //const EnmapLevel = require("enmap-sqlite"); | |
| const client = new Discord.Client(); | |
| /* | |
| usually i create the properties below such as settings in a guild create event | |
| such as: client.settings.set(guild.id, {"mutedIds": [], "mutedRole": ""}); |
This file contains hidden or 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
| message.delete(); | |
| const msg = await message.channel.send("Ping?"); | |
| msg.edit(`Pong! Latency is ${msg.createdTimestamp - message.createdTimestamp}ms. API Latency is ${Math.round(client.ping)}ms`); |