Discord Bot: Tomislav

This is used for general discussion that is not necessarily server-related.
Post Reply
User avatar
jp4
New to forums
New to forums
Posts: 9
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Aug 07, 2021 4:22 am

Discord Bot: Tomislav

Post by jp4 »

Made a bot for my friend to make source engine game server management easier. He said that people here might need it too, so I've decided to make it public. Please note that before using the bot you need to configure it and change up the code a bit, so some knowledge of python and discord bots is required.

All the information about the bot is on the github page: https://github.com/cheekybaguette/tomislav
Please don't hesitate to suggest features, improvements or report bugs.
Telegram: @navi150
User avatar
hiimcody1
Staff
Staff
Posts: 1452
Joined: Wed Dec 28, 2011 4:59 pm

Re: Discord Bot: Tomislav

Post by hiimcody1 »

There's some neat stats gathering in there for traffic and CPU usage.

Something I'd recommend after scanning through it would be breaking those channel/user IDs out of the code and putting them into that config.json as well, just for better portability.
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

hiimcody1 wrote: Sat Aug 07, 2021 10:16 am There's some neat stats gathering in there for traffic and CPU usage.

Something I'd recommend after scanning through it would be breaking those channel/user IDs out of the code and putting them into that config.json as well, just for better portability.
Sure, will do. Actually this pushed me to another idea that I had in my mind for quite some time already but I was quite lazy to implement it since it requires major changes to the code, so yeeah... it's going to be quite a day (whenever I get on it, that is)
Telegram: @navi150
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

Pushed a pretty big update, including:
1) Getting rid of global variables (using class variables instead)
2) More documentation!
3) More portability by putting some of the stuff to config.json
4) More and better comments in the code
Telegram: @navi150
Naleksuh
This is my homepage
This is my homepage
Posts: 182
Joined: Thu Jul 25, 2019 12:35 am

Re: Discord Bot: Tomislav

Post by Naleksuh »

Interesting.

If I understand, the original purpose of this bot was packet capturing from a VDS, right?

If so, I'm currently working on a library for the control panel, and one thing I think would be interesting is using the packet capture feature from the control panel.

I'll have to see how they handle differently, comparing that to this bot of yours.

Are you planning implementation for multiple chat clients, or only Discord?
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

Naleksuh wrote: Wed Aug 11, 2021 4:46 pm Interesting.

If I understand, the original purpose of this bot was packet capturing from a VDS, right?

If so, I'm currently working on a library for the control panel, and one thing I think would be interesting is using the packet capture feature from the control panel.

I'll have to see how they handle differently, comparing that to this bot of yours.

Are you planning implementation for multiple chat clients, or only Discord?
The original purpose of this bot was just checking the cpu usage on the server, because back then people abused lag exploits in the source engine to lag our server and we wanted to know when it happens exactly. Since then the bot has grown massively and i'm quite surprised by that, but enough backstory.
I'm using tcpdump with the command arguments that one of the admins himself provided for capturing traffic. But since you reminded me that the control panel is a thing I'll look into using it instead (or make it into a separate option, because then people can use traffic capture on any server provider), I don't think I'll have troubles with that.
Right now it's only for discord, I don't plan on making it for other platforms. However you are free to just rip out everything out of my code and port it to a different platform.
Telegram: @navi150
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

Naleksuh wrote: Wed Aug 11, 2021 4:46 pm Interesting.

If I understand, the original purpose of this bot was packet capturing from a VDS, right?

If so, I'm currently working on a library for the control panel, and one thing I think would be interesting is using the packet capture feature from the control panel.

I'll have to see how they handle differently, comparing that to this bot of yours.

Are you planning implementation for multiple chat clients, or only Discord?
I just implemented traffic capture from the nfo control panel in the bot (thanks to the reference in your nodejs api :D).
I'll push it to the github page soon with proper credits.
Telegram: @navi150
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

For anyone that is interested I implemented a slight modification to the bot to allow it to work as a selfbot in the according branch: https://github.com/cheekybaguette/tomislav/tree/selfbot. All the checks regarding the source dedicated server are cut out, however I've left in the ddos check and native traffic capture. It's really intended to be proof of concept of how to easy it is to make a selfbot, because I've seen cases of people buying very private selfbots for huge prices which is just really hilarious to me. Anyway, have fun.
Telegram: @navi150
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

I've made the repo private because of a simple mistake: I leaked a few passwords and tokens. But github decided that it is time to completely make my stuff private and hid my account (for a few mistakes I've done). I have a new github account but I thought of porting my bot to c++ because I NEED to learn it sooner or later, so the python version will be kept hidden away (it was pretty bad anyway, it's not something that I'm proud of).
Here's a link to my new github account: https://github.com/relaxtakenotes
Telegram: @navi150
Naleksuh
This is my homepage
This is my homepage
Posts: 182
Joined: Thu Jul 25, 2019 12:35 am

Re: Discord Bot: Tomislav

Post by Naleksuh »

Wow that sucks. I've been working on an update to my library but have had many setbacks. I'm sorry your own GitHub account has been hidden as well. :(

That once happened to one of my accounts but I appealed it and it got restored. Sad that it was not the same for you.

Will you be adding the Tomislav repo to your new account ever?
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

Naleksuh wrote: Mon Oct 04, 2021 12:35 pm Wow that sucks. I've been working on an update to my library but have had many setbacks. I'm sorry your own GitHub account has been hidden as well. :(

That once happened to one of my accounts but I appealed it and it got restored. Sad that it was not the same for you.

Will you be adding the Tomislav repo to your new account ever?
I just realized that python 3.10 came out, so yeah, in close future. I only want to mess with the match case stuff, since it seems to be neat.
Telegram: @navi150
User avatar
jp4
New to forums
New to forums
Posts: 9
Joined: Sat Aug 07, 2021 4:22 am

Re: Discord Bot: Tomislav

Post by jp4 »

I thought it'd take me longer but alas, here we are.
https://github.com/relaxtakenotes/tomislav-py
Have fun with that.
Telegram: @navi150
Post Reply