Boundless Bot - Hunts and more!

I’d like to introduce my version of a Boundless bot -

Boundless Bot Details :

  • Production mode : BETA TESTING
  • Release version : 0.0.9
  • Language : Node.JS v16.9
  • API Framework : Discord.js v13.6
  • Platform : Currently Debian but will be moved to a nodeJS Docker container running on a Debian VM I have.

Initial Notes :

So I’ve always wanted to do a Discord bot but because we already had Protector Venari and a few other tools I decided to not put any time towards it. Since we are in a situation where we need one now, I went ahead and built one in the latest version of NodeJS and using the DiscordJS API framework. While it mirrors some of the features of previous bots, I am approaching a few things differently and want a more robust feature set.

Do be kind since this is my first pass at putting it all together and we might have an issue or two over the next few weeks while we are in a beta test phase. I’ll be monitoring the bot and if it goes down I will try to get it up as fast as possible after the issue is fixed.

I decided to not limit who can test the bot and instead make it available to everyone. If you test the bot I cannot guarantee that you might not have to register your server again when we finalize the code. I admit I am a bit nervous it will crash or stop working in the middle of the night since I haven’t had much time to test. This was all done in about 4 days. Please be patient…

Installation :

  1. If you wish to install the bot go to this link [ https://discord.com/api/oauth2/authorize?client_id=961118308395008030&permissions=2147568640&scope=bot%20applications.commands ] to have the bot join your channel.
  2. Either use the server role the bot created or create/add the bot to a role that you plan to use for channel permissions. Ensure permissions are correct. At this point it only uses permissions for: send message, read message history, embed links, and the view channel for all channels you want the bot to work in.
  3. Create a channel (called whatever you want) that you want to be the “main bot channel” the bot uses. Then make sure the bot has the ability to access that channel and has the permissions mentioned above via the role.
    NOTE : double check all permissions and make sure the “everyone” role (or another the bot is assigned to) isn’t conflicting with the bot’s server role to send_message.
  4. To receive player posted notifications from the bot you need to register your server. To do this, either the owner or permission based administrator of the server, needs to go into the main bot channel they want the notifications to show in and type the following command: .registerserver
  5. The registration command grabs your Server ID and that Channel ID and stores it so the bot can message you.
  6. Once the bot acknowledges you are registered everything is set up and you will receive message pings.
  7. Try a test command in the channel to ensure that you have permission and everything is working : .ping

Post Hunt Notification

  • Please read notes:
    • Currently this is a global command that will notify every server that is registered. So please respect this feature and don’t spam people.
    • The bot sends an embeded message for hunt posts which is different that pervious bots. This means you will need to work a bit on formatting your hunt message if you want it to look a certain way. Also note there might be some issues with formatting because of what an embeded message allows and does not.
    • I have decided to have the notification commands to be done via private message to the bot. The main reason is to cut down on posts to the main bot channel by people. Plus this helps allow for the ability to test the message without bothering people.
  1. First test your hunt message so you can make sure it looks nice. From a private message to the bot type the following command where you replace “text” with whatever message you want: .testhunt “text of my message”
  2. The bot will private message you back with what the hunt message will look like.
  3. Once you have a message you like then use the following command to send an official notification to all servers registered to see it using: .posthunt “text of my message”
  4. The bot will send a post to whatever channels are registered to see it.
  5. If you want “role notifications” pings you need to set up the role (use the .getroles and .setrole commands).

Supported Commands :

  • Command Prefix : .
    [note: the bot uses a as the command prefix and not a “!” so there is no conflicts with other hunt bot]

  • Command List :
    .help = List of supported commands type.
    .uptime = How long the bot has been online in days/hours/minutes/seconds.
    .info = Gives some server info and details regarding the bot.
    .ping = Replies with “Pong!” to show if bot is acceping commands.
    .beep = easter egg.
    .registerserver = registers your server to receive alerts.
    .removeserver = not implemented yet, but will allow you to remove your server from receiving alerts.
    .getroles = gets current server permission roles
    .setroles = used to set or update the role id on the server of which role to notify during a .posthunt message.
    .testhunt = test privately your hunt notification messages.
    .posthunt = please be careful since this command will post your message to all the registered servers main bot channels and roles.
    .updatechannel = not implemented yet, but will be used to update the “main bot channel” on where you want notifications to go to.
    .addpingrole = not implemented yet, but will be used to allow people to add (and remove) themselves to the server role that gets the “ping role” alert.

  • If you have some ideas on commands or features let me know.

Support

  • At this point if the bot has problems just post here on the forum or give me a ping in Discord. As mentioned it might be a bit bumpy for a few weeks.

Upcoming Improvements over next few months

  • I’d like to add it at some point the official Boundless server bot channels but am not sure who has access to discord with the right permissions. Let me know if you know who can…
  • I plan to provide the option where only a certain role can post global messages in your server.
  • I plan to try to make there to be less need to have certain commands run from either a “private message” or the “main bot channel.” Right now it was due to how I implemented some things and I just need to figure out how to get the data I need in another way. Note that I will still be trying to make sure that the main bot channel isn’t filled with command spam.
  • I plan to have a feature where you can update the main bot channel.
  • I plan to have a feature that allows you to be added/remove to the “ping role” alert.
  • I plan to have a feature where you can de-register your server if you no longer want it. I also want to have an auto-monitoring feature that will see if the bot is removed from the server and clean up the old entry.
  • I need to make sure the file that stores all our player server and channel information is safe and backed up so if there is ever a big crash we won’t have to have everyone register their details again. Yes it uses a JSON file right now and I might consider moving to a small database solution but preferred to now have the overhead right now of that additional service.
  • I plan to add more details on the “info” command.
  • I will be redoing the bot to use “slash” commands.
  • I want to improve the bot with more features based on feedback.

Well I think that is everything. I will be updating the message as we progress through beta testing. I hope you all find the bot useful. Let me know your thoughts or feedback…

11 Likes

Honestly, Node does just fine holding the amount of data you’re talking about in memory, and just save to file as backup. I wouldn’t personally bother with a db unless you start messing with a whole lot more data, tbh. It’s not like you’re doing all that many write operations anyway, since new servers don’t register often, and you should only have to read on server start if you set it up right.

Just a reminder to verify permissions before doing a .ping test. My code isn’t checking to make sure I have permissions in a way that doesn’t crash out the bot if there is an error. So I need to fix that asap lol… I should have tested that scenario more first.

1 Like

Feature request:

1 Like

In regard to this feature request, it would also be nice if we could do something about tracking when a sov was last scanned. For example, if there was a way to tell your bot a list of planet names that we scanned so that scanner people can submit the list after we’re done.
Note that I believe the Boundlexx API does have a “last updated” timestamp, but it is my understanding that it only tracks when an entry was updated, so re-scans don’t act as a confirmation of recently validated information.

Then, your bot could optionally grab only “recently scanned” planets. It would be nice if the report included frequency and/or tier of occurrence in addition to just “not available” so that if someone is picking colors for a T1 planet, they could potentially choose to use colors only available on someone’s T6 sov.

Of course, this would probably require an actual database… :sweat_smile:

3 Likes

I think I can freely speak for the GTG family… THANK YOU, somebody get this guy a friggin medal!

2 Likes

I didn’t even notice the other bot was down, Thanks for the hard work!

Thanks… well I know there are a few weird bugs that might cause it to go up and down for a few days. but I will get it ironed out.

There are a few guilds signed up now and the bot is functional for actual posts… so people can start using it. I want to make sure people understand it is up and ready for use.

At this point the perms issue is likely the only thing causing a hiccup but I should have that fixed in a few days. Until then everyone is safe and welcome to use it like it is fully ready.

Also if you know any other less active guild leaders, maybe let them know they can set it up.

Hello thank you for working with the bot
I would be very happy if you could make a video on how to install the bot because I have small difficulties in getting the bot to work. I would like a video that is very helpful LG Hugo

Where to find the Mod and how to use ? I ll lead so many hunts IT would be great to have a hunt notification again . Dies IT works over discord AS the Other did?
Greetings Turrican2006

Why are you using the old style commands instead of slash commands?

Turrican, check the Hunt HQ channel in our discord. We have it already set up, with the list of commands in there as well!

2 Likes

There are instructions on the original posting of this thread. I can make a more detailed one this weekend. As for a video, I will have to look into some options on that since I don’t really do those lately and a text step by step is always easier if things change.

1 Like

Since this was my first attempt at a discord both, I admit I took a safer route because I saw in their API details that there are limits on slash commands. Additionally, I didn’t fully understand the nuances of global vs local server commands and the different types and how many we can have of each. Due to this I didn’t want to go down a path that might result in a dead end later on and require a decent code change especially since this was my first attempt. So it seemed safer and easier right now to just have a switch/case list to manage the commands for gen 1.

Most of their documentation is written in a way that it is assume the person understand everything very well. It isn’t for those still trying to grasp the intricacies. Once I can better grasp the command types with sub commands, the limits per type, and other things like if we can have a variety of “registered” commands with “non registered” commands I will likely change things up. The good news is switching over would just be a matter of remapping how a command executes. Of course then letting people know the new commands.

Once I get the perms issue and a few other possible bug or crash situations fixed then I plan to start looking into that as I do the other things I liked in the todo section. If you have Discord bot tips just let me know… :slight_smile:

Yes it is basically the same. There is a bit of a change in the commands and how they execute. Some of that will be adjusted but I just did something that worked for the first version. Obviously, if you have tips or ideas or features you’d like to see to help you, just let me know or add them here.

The “role” notification added to the channel notification should come in this weekend I hope. Real work has sucked up more time this week than expected and I’m out most of the day Saturday for family stuff.

But like Nickk said you all are good and have perms right for messages from what I saw.

Do have a question tho, as I might have missed it somewhere.

Are there plans. or thoughts on adding the ability for the user to set themselves a role to be pinged?

Similar to how the previous one was !hunter and it would set the user to the list to be notified?

Simple answer: Yes

More detailed plan: I plan to have a role that the server owner or admin can set up on their server (and update if you want to change) that will get a ping. I know I can just add that role name to the message but I was wanting to see if there are any other options in how to do it. This should happen soon because I know “channel posts” are not as helpful for notifying people.

Right now the bot has basic send/read rights. I do want to add the !hunter type command where a member of the server can run that and get added to that role. Since that will (I’m pretty sure) require more server rights, I want to do safely and see what makes sense in how I grow the bots rights inside each groups server. In my day to day job I do a lot of IT security architecture so I’m careful with this stuff. So this option will likely be after the first role ping.

I also will add that people can update the channel that gets pinged and also allow people to “remove” themselves from that role ping. I like opt in and opt out features. At the bottom of the original post is kind of a todo list…

Yeah, makes sense.

We were discussing setting up an automated role set bot, so people could just click a button and apply the @GTGHunter role that we had been currently using, and just testing adding the @mention to the hunt ping with your current bot.

But when it comes to all that stuff, I’m a novice lol

Yeah… I will definitely be adding that. If you all can wait a bit longer.

2 Likes