Features

Wanna know more about MaryuBot? Here are all of his features!






Mention system

Are you tired of pinging users in commands? Me too. That's why MaryuBot has his own mention system!



With MaryuBot, you don't need to ping users anymore. Instead, you can use:




Side note: +hello isn't a real command. We added it 5 minutes before taking the screenshots and then removed it again lol


MaryuBot's mention system does a lot more than just fetching the right user. If you want to learn more about it, check out the guide!




Permission check

Did you know that bots throw out a big error message when they send a message without having enough rights? MaryuBot checks if he has those permissions before he sends his messages.



Imagine you are a bot developer that just started developing his/her first bot (greetings to all fellow developers). You let your bot run for a few hours and it will throw out some errors. You open the log and read "DiscordAPIError: Missing permissions".

You'll probably open Google and search for this issue. Some sites tell you to attach .catch(console.error) to all your commands. Well, it will still throw the error. But a bit more fancier.

Some other sites tell you to stop the command when the bot does not have permissions. (Talking about .catch(error => { if (error.code === 10008) return; }); (for JavaScript)). But, that will just stop the command and won't tell the user what the error is.

We speak from experience - we had the same issue when we started developing MaryuBot. Meanwhile, we did some changes to our code. MaryuBot now checks if he has all the rights needed to execute the command. If you see something like this:


[Image] Are you trying to execute a command? I cannot execute commands here. I am missing the following permissions. https://www.maryubot.maryu.eu/assets/get-started-permission-denied.png

then you should check your permissions. By the way, we made a guide about granting permissions. Check it out if you need help!






Cooldown

You are on cooldown! Please wait 5.0 seconds before continue reading. No, just kidding. Please continue reading why MaryuBot has a cooldown.



You like spamming commands? Me too. But MaryuBot doesn't like it. I mean, even if our server is a bit shitty, it can handle spamming pretty good. But why is there an annoying cooldown of 8 seconds then?

The root of all the problems is the database. MaryuBot uses it to store information that needs to be stored for a long time or that needs to be sent to another platform (like this website). Bots can store information as well, but they reset everything to default after a restart. Not very good if you want to store e.g. the command usage.

So, if you start spamming a command, MaryuBot tells the database: Give me the command counter of this command, add 1 and store it again. And he does that in less than a second, multiple times. The database takes it easy and queues those requests. Give me the first, wait a few milliseconds, then give me the second, wait again... and so on.

Well, now the queue contains hundred requests, then two hundred, then three hundred... whoops, cache is full. But MaryuBot keeps pushing in new requests. The cache overflows, the breaker pops, the bot crashes.

But we can prevent this from happening by preventing the user from spamming. Also, 8 seconds aren't that much time. The cooldown timer starts as soon as the bot receives the command, which means that there are only 5-6 seconds left when the bot replies to your command. Then, all you need to do is to type slowly and the cooldown will run out.

That's the story of MaryuBot's cooldown. We hope you'll now understand why this happens:

[Image] You are on cooldown. Please wait 6.9 more seconds! https://www.maryubot.maryu.eu/assets/features-cooldown-prevent.png

instead of this:

[Image] Massive cookie overflow! Whoops, the bot has crashed. https://www.maryubot.maryu.eu/assets/features-cooldown-overflow.png




Command statistics

MaryuBot saves how many times a command has been used - and you can access those counters!



Every time you run a command, a little piece of code inside MaryuBot triggers. That's the command counter, which counts how often a command has been used. You can access this counter at anytime by using the statistics command.

On January 1st 2021, we enabled this little counter just because we wanted to know how often MaryuBot's command are being used. So we can disable and delete unused commands. More space for new ones!

If you are interested in how often a command has been used, grab that command name and type +statistics command (name of the command). The bot gets the command counter and shows it to you. You'll see, some commands have been used frequently and some haven't been used at all!

[Image] The command cookie has been used 253 times - https://www.maryubot.maryu.eu/assets/features-commandcounter-example.png




Dynamic help command

Not 100% dynamic, but hey! It works!



MaryuBot's commands and descriptions are all saved in the database, so we can easily update them. But there is another advantage of saving commands in a database: You can use them everywhere!

Do it. Type +help in any channel MaryuBot has access to. He will send you a list of all commands in private messages. There you have a simple help command with all commands and a short description.

Short descriptions aren't always very helpful. If you want more information about a command, simply add it to the help command! Let's run +help partyparrot together. Now the bot sends you more information about the partyparrot command!


Please note that private messages need to be enabled to use the +help command. Need help enabling them? Click here!



[Image] Command info: partyparrot - https://www.maryubot.maryu.eu/assets/features-help-commandhelp.png




Message editing

Don't you hate it when you accidentally misspell a command name and then you need to type the command again? Well, just edit the message! MaryuBot will listen to it!



Message editing is a feature not many bots have. That's why this feature probably won't be used often, cause everyone is used to retype the command. But for those who want to test, MaryuBot will also listen to edited messages!

But, we found out that this feature can be abused because the cooldown ignores edited messages. So we limited it a bit. Messages can be edited...

This means for you that you have 60 seconds time to edit the message and you can only edit it once. If you try to edit it again, it will refuse to execute again.


Info: This feature is still in beta, which means that it might not work. Sometimes, if you edit the message and MaryuBot doesn't do anything, it probably threw an error. Also, you can edit the message even if it ran successfully on first time (the command will run twice). We're trying our best to get it working as fast as possible.

[GIF] Editing a message - https://www.maryubot.maryu.eu/assets/features-messageediting-example.gif




More features coming soon! ;)