This is a Discord bot that aims to help players of MMORPG Argentum Online (AO for short) with the barter of items between each other.
Users in a server with this bot running can publish items to be sold; list item offerings (either all currently undergoing, or by making a specific search for an object); and/or claim said sales for their own, in which case the bot will DM involved parties so they can meet up and finish the transaction.
If you have ever played vanilla Argentum (or its mods for that matter), you most probably have already realized that it is a great game but severely lacking in the commerce aspect.
With the exception of only the most modified client/server variants, the game doesn't even have an auction system in place. Therefore most "merchants" must publish their sales on the game's forums and hope that potential buyers are keeping an eye on these commerce threads that pop up. And with the advent of Discord and the des-use of bulletin boards, this practice is becoming more cumbersome day by day (some currently undergoing Argentum projects don't even have a forum of their own anymore!).
Nothing, but don't you find that a little spam-prone?
Even with a dedicated commerce Discord channel - which is what most Argentum servers end up doing to organize things a little -, a couple dozen players shouting their offerings in a public chat can hardly be called a "marketplace". The issue is only going to get worse the more people are present, so it pays to have an entity centralizing the offerings while also providing some listing and searching capabilities.
Good! Then go on into configuring your MercadoAO instance. It shouldn't take more than a couple of minutes to have the bot completely set up and administering your game's marketplace!
If you have come this far, then you want to set up a MercadoAO instance for your game server. Here is what you have to do:
You should setup your Discord's bot token inside config.ini
.
Optionally, if you wish for the bot to make automatic sale announcements every time a new item offering is made - which would help keep the economy going and the money flowing 😆 - then the announcement-channel's ID should also be specified (see how to get a Discord's channel's ID).
The bot will load and index the complete list of all sellable items on startup. No offerings nor searches can be made on items outside this list.
It currently has a base master list coming from vanilla Argentum Online's .DAT files; but your game's item list may be different in practice (specially if your game is an Argentum mod), and that's why you can customize it to your game's flavor.
Said item master list lives in resources/items.json
, and should be an array with the following structure:
{
"nombre": "Manzana Roja",
"precio": "2"
}
Extra parameters are allowed but ignored.
The master list will be indexed on MercadoAO's startup. While indexing, each item will be given a unique identifier (UID) based on its name, checking for collisions. If a collision is detected, it is a strong indicator of a duplicate item, which is not allowed and should be sanitized (entry removed or renamed) before starting up the bot again.
Given that the items' UIDs are hashed constants, they are volatile and can be rebuilt without repercussions as long as the item's names remain the same.
To see a list of all allowed commands, type $help
in a channel where the bot is in. For more information about a specific command, type $help <command>
From this point onwards, this information will only be relevant if you want to add features to the bot yourself.
In order to start developing features for this bot, you will have to install its dependencies and setup the commit hooks:
pipenv install
pipenv run pre-commit install -t pre-commit
pipenv run pre-commit install -t pre-push
Want to give a hand? PRs are welcome!