Another Discord pogo bot for everything you'd want.
A few of the features include (in modules):
- Dynamic Raid information (see
!raid) - Respond to specific words without the need for a prefix (see
!ivy cmd) - Modularized commands
- Pogo news auto-posting
- Gym directions
- node.js
- An available discord server with Admin (or equivalent) permissions
- (Optional) MySql or equivalent
npm install
- Create file
config/config.ini(you can base it offconfig/config.ini.example - Change presets to your specific configuration
- Include/disclude any modules
discordtoken- bot discord token
botname- will be expanding on laterdbport- the custom port that your database is running on. Omitting this will assume3306(the default MySql port)adminUserId- put a user id in here to enable message forwarding - if someone sends a DM to the bot, gets forwarded to this usermodules- all modules that you want loaded - these are located in/src/modules/*adminmodules- all admin modules that you want loaded - these are located in/src/modules/admin/*cleanableChannelsIds- for the channelclean module, these channels will be cleanable when you type in!clean- NOTE: You can only delete messages newer than 14 days
forcedChannelId- Channel id to report changes in game update forced statustradetags- roles allowed to behave as a tag for tradingnewsChannelId- Channel id to post new news from pogo - nothing will be posted when initially run since Ivy doesn't know what's new!- Where Is information (only needed if
databasemodule is enabled)whereIsDatabaseType- database type forwhereismodule - accepts eitherrocketmapormonoclecurrentlywhereIsDatabaseName- the name of your database (schema) associated with the above settingwhereIsCacheRefresh- How frequently the cache file should be updated from the database - in minutes
googleMapsAPIKey- API key for Google Maps - currently only used in thewhereismodule- Database parameters - when specified, these must all be specified
dbhost- database host namedbuser- database user namedbpass- database passworddbname- database name
node ivy.js
I highly suggest using a process manager such as pm2.
There are two ways to get a list of every possible command in Ivy, either !ivy cmd, !ivy commands, or !help
There are a different set of commands based on the modules for admins.
This will give a broad overview of all commands, including all module commands.
You must have the `database` runner (as well as `admin/commands`) enabled for this to workWith this set of commands you can do the following:
- Get a list of all commands on the database (by page)
- Add/Update/Remove commands from database
When anything is typed into a message on any channel on Discord, Ivy will check this message to see if it matches one of the commands listed in the database.
If nothing is found, it goes onto the modules to see if something in one of those matches.
To get a list of all of the database commands/responses, use !ivy cmd {number} where {number} is a page number (10 per page).
Ex. !ivy cmd 1 would get the first 10 results from the DB
The following commands are for admins only
Note: Spaces are important when it comes to adding, removing, and updating commands, as well as the placement of the double quotes
To add a new command, use .cmd add "command title" "command value" where command title will be the name of the
key in the database and command value will be the response
Ex. .cmd add "wew" "lad" will have Ivy respond with lad when anybody types wew
To update any database command, use .cmd update "command title" "command value" -- this will remove the previous
value that was in the database for command title and replace it with command value
Ex. .cmd update "wew" "Not lad" will have Ivy respond with Not lad when someone types wew instead of
lad as listed in the previous example
To remove any command from the database use .cmd rm "command title" where command title is the key in the database
Ex. .cmd rm "wew" would delete the wew command as listed in the previous example
Keep in mind that this is non-recoverable unless you make database backups prior and restore from them.
By default, as listed in the config/config.ini.example file, the default enabled modules are
"modules": [
"raid", "selfassignrole", "channelclean", "commands", "whereis"
]
and the default admin-only modules are
"adminmodules": [
"commands"
]
These values represent the name of the files in the src/modules and src/modules/admin folders respectively.
To disable any of these, just take that value out of the list there
Note: be careful that your file remains in a valid json format
For example, in removing the channelclean module, the modules section would look like the following
"modules": [
"raid", "selfassignrole", "commands"
]
Keep in mind this removes the double quotes and extra comma as well
Runners are basically a module that is only run once, and are located under modules/runners.
As like normal modules, these are defined in an array in config/config.ini.example in runners
"runners": [
"database", "forced", "pogo-news"
],
For those of you developing your own runners or modules, this is where you'd put things that either
only run once or need to run repeatedly (such as setTimeout or setInterval). This way, things won't
repeatedly get called and created, causing forever-growing memory requirements.
If you feel yourself tech savvy and think Ivy could use some neat new features, feel free to
create your own module and add it to either the src/modules, or src/modules/admin, enable it in your
config file, and use it along with Ivy!
Note: We cannot support custom code
If you feel that your module would make for a good addition to Ivy, feel free to make a PR. It will be reviewed promptly and responded to when time allows.
!raid {monster name}- This module is for detailed dynamic info on a raid boss in pogo in a neat embedded format.
- This info is updated every month, or when
cache\raids.jsonis deleted and another of these commands is used.
.iam {role name}- Modeled after Nadeko's
.iamformat, this will allow any user to give themselves a role from an allowed role list that's defined inconfig/config.ini.examplein therolessection. - The
rolessection in the config file has to be modified before this will work appropriately. - This is perfect for raid communities that have town or team roles
- Modeled after Nadeko's
!clean!!Still Experimental!!- Allows for any user to type
!cleanin a channel and the last 14 days of activity will be deleted from that channel as long as that channel id is included in thecleanableChannelsIdslist inconfig/config.ini.example. - Recommended to move into
modules/adminor disable to avoid any unnecessary spam from users. - I'm still looking for a decent way to clean up all messages in a channel since one of the Discord JS API limitations only allows for deletion up to 14 days prior.
- Allows for any user to type
!ivy commands- This is explained in more detail in the above sections
- Forced Checker
- Checks the status of the game update's forced version.
- Notifies to channel of choice (through the config file's
forcedChannelId) when an update is forced or reverted.
!trade {tag|username|nickname|userid}and!register {trade code}- Requires the
databaserunner to be enabled - A registry for trade codes based on tags
- A tag is registered by assigned roles for a person.
- A person must be assigned a role for this to work for them.
- Requires the
- Pogo News Poster
- Checks if new news is posted from pogo.
- Notifies to the channel of choice (through the config file's
newsChannelId) when something new is posted by them.
where is {gym/stop name}- Posts the location of a stop or gym in an embed with a link to the location
- Posts a static map if
googleMapsAPIKeyis filled out - Logic flow: If the database module is not enabled, then it will always look in the cache file
cache/whereis.jsonOtherwise, it will check the config optionwhereIsCacheRefresh- also requires otherwhereIsconfig options - and see if the life of the file is more than the specified refresh time. When the config time is 0 it will always grab from the cache.
If you have any questions, feel free to PM me on Discord, or open an issue on this repo.
I hope you enjoy this project! ^-^