This repository was archived by the owner on Feb 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Chat Relay #5
Merged
Merged
Chat Relay #5
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6c31f2a
not entirely sure if the leave one is working but hey the join messag…
ATXLtheAxolotl 18e1d16
uh i forget what I did and I don't wanna look back at what I did I ju…
ATXLtheAxolotl 07b1cc8
drippy chat relay
ATXLtheAxolotl 70759de
/status command update
ATXLtheAxolotl b60d21c
/status images
ATXLtheAxolotl a181684
Names for /status
ATXLtheAxolotl b255d9a
add very important issue
ATXLtheAxolotl 9a549c3
oh it has to be a url okay Markdown!!!
ATXLtheAxolotl 9d2d829
Remove unnecessary characters
ATXLtheAxolotl 2891165
Added comments for easier understanding
XeynQ4 b4cb339
Merge pull request #1 from XeynQ4/main
ATXLtheAxolotl 64271c8
Merge branch 'main' into main
ATXLtheAxolotl f71f571
Use specific version of minecraft-protocol
ATXLtheAxolotl 9ba2337
The Great De-dripization
ATXLtheAxolotl aefb67a
add constants to config.d.ts
ATXLtheAxolotl 5daad47
clean(PlayerAPI): Remove PlayerAPI class and only use Player class
ATXLtheAxolotl cea2631
clean(): Use loweCamalCase for function names.
ATXLtheAxolotl e378295
clean(): Rename checksrv() to checkSRV()
ATXLtheAxolotl a1d2f6f
add(): Logo.jpg
ATXLtheAxolotl 507228d
fix(): Use URL defined in config
ATXLtheAxolotl b3ad61a
fix(): Use URL's from GitHub rather than Youtube.
ATXLtheAxolotl e934d7b
clean(): Use full names in config
ATXLtheAxolotl cb66543
Merge branch 'main' into main
ATXLtheAxolotl 80ac37b
add(): Long mute list of N00b's
ATXLtheAxolotl f1c7436
Merge branch 'main' of https://github.com/ATXLtheAxolotl/liveunderflow
ATXLtheAxolotl 9d53ee1
fix(): Add a ?
ATXLtheAxolotl a64f383
feat(): crappy cache
ATXLtheAxolotl 313f185
fix(): Correct time in a comment.
ATXLtheAxolotl 9e0b459
fix(README): Check off #3 because this resolves it.
ATXLtheAxolotl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,3 +105,7 @@ dist | |
|
|
||
| # TernJS port file | ||
| .tern-port | ||
|
|
||
| # Custom | ||
| Minecraft/auth/ | ||
| Minecraft/cache/ | ||
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import Jimp, { MIME_PNG } from "jimp"; | ||
| import { DiscordClient } from "../Utils/DiscordClient"; | ||
| import { AttachmentBuilder } from 'discord.js'; | ||
|
|
||
| export async function uploadImage(image: Jimp, client: DiscordClient) { | ||
| const buffer = await image.getBufferAsync(MIME_PNG); | ||
| const attachment = new AttachmentBuilder(buffer, { name: 'image.png' }); | ||
| return client.sendAttachments(client.config.guild.channels.cache_channel, [ attachment ]); | ||
| } |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import { createClient } from '../Utils/MinecraftClient'; | ||
| import { DiscordClient } from '../Utils/DiscordClient'; | ||
| import { handleChat } from './Chat'; | ||
| import { PlayerManager } from './PlayerManager'; | ||
| import { ProfileCache } from './ProfileCache'; | ||
|
|
||
| export function handleMinecraft(client: DiscordClient) { | ||
| if (!client.config['in-game-bot'].enabled) return; // Returns if there is no bot config | ||
| client.bot = createClient({ | ||
| host: client.config.ips.n00b, | ||
| port: 25565, | ||
| username: 'sysctl', | ||
| profilesFolder: __dirname + '\\auth', | ||
| auth: 'microsoft', | ||
| disableChatSigning: true | ||
| }); // Creates the bot | ||
|
|
||
| client.bot.profileCache = new ProfileCache(client); | ||
| client.bot.playerManager = new PlayerManager(client); | ||
|
|
||
| client.bot.on('disconnect', (packet) => { | ||
| console.log('Disconnected from server : ' + packet.reason); | ||
| reconnectToServer(client); | ||
| }); // Sends log message when the bot disconnects from the server and reconnects it | ||
|
|
||
| client.bot.on('end', () => { | ||
| console.log('Connection lost'); | ||
| reconnectToServer(client); | ||
| }); // Sends log message when the bot loses connection to the server and reconnects it | ||
|
|
||
| client.bot.on('error', (err) => { | ||
| if (err.message.includes('play.toClient')) return; | ||
| console.log('Error occurred'); | ||
| console.log(err); | ||
| }); // Sends log message when the bot encounters an error | ||
|
|
||
| client.bot.on('connect', () => { | ||
| console.log(`Connected to Server...`); | ||
| handleChat(client); | ||
| }); // Sends log message when the bot connects to the server | ||
| } | ||
|
|
||
| // Waits a minute and tries to reconnect to the server | ||
| function reconnectToServer(client: DiscordClient) { | ||
| console.log('Reconnecting in 60 seconds...'); | ||
| setTimeout(() => { | ||
| console.log('Attempting to connect...'); | ||
| client.bot = createClient(client.bot.options); | ||
| }, 1000 * 60); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.