[WIP] UT Server Query Discord Bot (NodeJS) 2.4 2021 Release

Discussions about UT99
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

[WIP] UT Server Query Discord Bot (NodeJS) 2.4 2021 Release

Post by UT Sniper (SJA94) »

A Discord bot that communicates with Unreal Tournament, and Unreal servers and displays their responses into a text channel.

Download: https://github.com/scottadkin/Unreal-To ... es/tag/2.4

Version 2.4 Change Log:
- Fixed .servers and .active not displaying anything if server list is large and exceeds 1024 characters, now the bot splits the messages into blocks to get around the limit.
- Enabled Discord cache management to reduce RAM usage.
- Fixed memory leaks.
- Server ping info starts straight away instead of waiting for first tick.
- Bot no longer deletes non bot messages in the auto query channel.

Version 2.3 Change Log:
- Added support for Unreal Servers

Version 2,2 Change Log:
- Fixed timeout messages being displayed in auto query channel.

Version 2.1 Change Log:
- Fixed memory leak, bot should only use around 30-75mb, previously was going into many hundreds of MB of ram usage.
- Fixed servers showing :flag_none: next to server names.

Github Repo and ReadME: https://github.com/scottadkin/Unreal-To ... iscord-Bot

Image
Image
Original Post:
Spoiler
For the last few days I've been working on a discord bot that queries UT servers, and displays their information in a text channel, with an option to allow the bot to automatically post the data every so many seconds/minutes of a selected server on a specific discord channel.

Latest Release: https://github.com/scottadkin/Discord-U ... v0.3b-beta

List of commands:

Code: Select all

.servers Lists all servers that are added to the database.
.q serverid Get more detailed information about a UT Server in the .servers list..
.q game serveraddress:port Get more detailed information about a UT server not in the .servers list. If port is not specified 7777 will be used.
.q ut 192.168.0.1:7777
.q ut2004 192.168.9.1:7777
.ip serverid Get server name and URL.
.help Displays this text block.
Admin Commands

.addchannel Gives the bot permission to post in the current channel.
.removechannel Removes the bot's permission to post in the current channel.
.addserver [.addserver game alias ip:port?password=password] Adds a server to the database. Example:
.addserver ut TestServer 192.168.0.1:7777
.addserver ut TestServer 192.168.0.1:7777?password=pug
.addserver ut2004 TestServer 2 192.168.0.1:7777
.addserver ut2004 TestServer 2 192.168.0.1:7777?password=pug
.updateserver [.updateserver id type value] Updates the server information with the matching id. Examples:
.updateserver 2 alias newname
.updateserver 2 ip 192.168.0.1
.updateserver 2 port 7777
.updateserver 2 address 192.168.0.1:7777
.updateserver 2 password newpassword
.deleteserver id Removes a server from the database with the matching id.
.allowrole name Gives the matching role permission to use the admin commands.
.removerole name Removes the matching role's permission to use the admin commands.
.setauto serverid Sets auto query to server id, and change display channel to current.
Demo video:
Q9eOmNqBF6Q


Github: https://github.com/scottadkin/Discord-UT-Server-Query
ReadMe: https://github.com/scottadkin/Discord-U ... /README.md
Last edited by UT Sniper (SJA94) on Thu Jan 07, 2021 2:10 am, edited 8 times in total.
User avatar
Darkelarious
Skilled
Posts: 175
Joined: Sat Feb 08, 2014 12:02 pm
Personal rank: 333networks admin
Location: Phobos Moon
Contact:

Re: [WIP] Discord UT Server query node.js (includes UT2004)

Post by Darkelarious »

Leaving a suggestion here to interface with the 333networks masterserver through json api. Perhaps we can (on both ends) work on a search/list function too?

http://333networks.com/json

Also volunteering 333networks' discord as testing ground.
--Darkelarious
Image
Masterserver | Discord Channel
Oh, and we still are ready to receive donations. The url works, right? It doesn't seem to be doing anything...
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: [WIP] Discord UT Server query node.js (includes UT2004)

Post by Chamberly »

Yes, it would be great to see the 2 of you joining forces Together and make something awesome on discord for UT! :)
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] Discord UT Server query node.js (includes UT2004)

Post by UT Sniper (SJA94) »

Darkelarious wrote: Wed Jun 24, 2020 11:02 am Leaving a suggestion here to interface with the 333networks masterserver through json api. Perhaps we can (on both ends) work on a search/list function too?

http://333networks.com/json

Also volunteering 333network discord as testing ground.
I'd be happy to make a 333network discord bot when I finish my current bot(s), I've had quite a few requests to switch to sqlite for my current ones so I will use that instead of mysql because it's unlikely to database will be more that a few kb at most.

The reason I say about a separate 333network bot is that, with 333network supporting multiple games and an existing api makes sense to take advantage of it to make a standalone bot with support for all games in your api.

Found it hard to be at my computer the last few days, it's been so hot and my room is a right suntrap at the hottest part of the day making it an uncomfortable experience, made worse with me being stupid eating(wheat) stuff I know makes me sick, got big reaction this time, looks like I got the measles rash :facepalm:
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] Discord UT Server query node.js (includes UT2004)

Post by UT Sniper (SJA94) »

Screenshot of a new bot I'm making for UT99, the one posted above is not available anymore because of how bad it was made ;)

Image
dixEEh
Average
Posts: 51
Joined: Sat Dec 17, 2011 5:41 pm
Location: Den Haag, Nederland
Contact:

Re: [WIP] Discord UT Server query node.js (includes UT2004)

Post by dixEEh »

Cool! any possible release date? im looking for something on my (new) discord for an Classic SLV2 Community
BP4 » Xan Mk.2 & WarBoss Dark Editions : Download Here! Happy 2012!
CTF-SanctumRedux nwCTF map in Quakestyle textures : Download Here! Happy 2020!
DM-RMC-SkaarjArena My Entry to the Ridiculous Mapping Contest : Download Here! Happy 2021!
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] Discord UT Server query node.js (includes UT2004)

Post by UT Sniper (SJA94) »

Shouldn't be too long, most likely by then end of next week.

Current Commands I've added.
Image
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS)

Post by UT Sniper (SJA94) »

Just a quick demo video of the auto query feature:
fo-NiMKKRvE
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS)

Post by UT Sniper (SJA94) »

A couple of new commands for the next version of the bot:

Image

Image


Updated help command:

Image
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS) 2.0

Post by UT Sniper (SJA94) »

The second version of my Unreal Tournament Server Discord bot is ready for testing.

A Discord bot that communicates with Unreal Tournament servers and displays their responses into a text channel.

Download: https://github.com/scottadkin/Unreal-To ... s/tag/v2.0

Github Repo and ReadME: https://github.com/scottadkin/Unreal-To ... iscord-Bot


Updated First Post.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS) 2.1

Post by UT Sniper (SJA94) »

Version 2.1 Released:

Download: https://github.com/scottadkin/Unreal-To ... s/tag/v2.1

Version 2.1 Change Log:
- Fixed memory leak, bot should only use around 30-75mb, previously was going into many hundreds of MB of ram usage.
- Fixed servers showing :flag_none: next to server names.
User avatar
gachimusa
Novice
Posts: 24
Joined: Mon Feb 24, 2020 12:09 pm

Re: [WIP] UT Server Query Discord Bot (NodeJS) 2.1

Post by gachimusa »

Hello.

I'm trying to use this bot and looks really useful man! :D

btw there is a thing I'm hoping.

when I use ".setauto" and there are some servers not running 24/7 on database,
this bot send many "timedout!" msg on the channel.

Image

So I hope this "timeout" noticing feature becomins toggle or overwrite(not new msg).

Thank you.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS) 2.2

Post by UT Sniper (SJA94) »

Sorry, I will add a check so timeouts are not posted in the auto channel.

Fixed timeout messages being displayed in auto query channel.

Download: https://github.com/scottadkin/Unreal-To ... s/tag/v2.2

Version 2,2 Change Log:
- Fixed timeout messages being displayed in auto query channel.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS) 2.3 Added Unreal Support

Post by UT Sniper (SJA94) »

Download: https://github.com/scottadkin/Unreal-To ... s/tag/v2.3

Version 2.3 Change Log:
- Added support for Unreal Servers
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: [WIP] UT Server Query Discord Bot (NodeJS) 2.4 2021 Release

Post by UT Sniper (SJA94) »

New release.

Download: https://github.com/scottadkin/Unreal-To ... es/tag/2.4

Version 2.4 Change Log:
- Fixed .servers and .active not displaying anything if server list is large and exceeds 1024 characters, now the bot splits the messages into blocks to get around the limit.
- Enabled Discord cache management to reduce RAM usage.
- Fixed memory leaks.
- Server ping info starts straight away instead of waiting for first tick.
- Bot no longer deletes non bot messages in the auto query channel.
Post Reply