This bot is intended for browsing multiple wikis from within a server. You can almost add all kind of wikis, ranging from a normal Wikipedia to a Gamepedia or Fandom wiki. You can then browse that wiki from within Discord using a set abbrevation.
An hosted version of the bot can be found at [top.gg](https://top.gg/bot/708782396023242753). Alternatively, you can host the bot yourself if you know how to do so, but be aware that this bot was created during version 11 of [DiscordJS](https://discord.js.org/). For the setup the following things are required:
- A PostgreSQL database must first be setup according to the schema in
database.psql. An example would be to first create a database withCREATE DATABASE db_name;and then load the schema withpsql -U db_user db_name < database.psql;. - A discord bot must be created at https://discord.com/developers/applications and the token must be added to
config.json > token. - The database host location (
localhostby default), PostgreSQL username and password must be added toconfig.json > database
Database connected is displayed in the console.
-
/help [command name]This command can be used to get a list of all commands or more info about a certain command. -
/add [wiki abbreviation] [wiki url] [default](This command is limited to the owner and admins of a server) Use this command to add (or update when using the same abbreviation) a wiki to this server. The provided wiki abbreviation can be used in conjunction with the/wikicommand to search that wiki. The wiki url must be of the formathttps://example.com. You can also set the wiki as the default for the server so the abbreviation is not needed when using/wiki. -
/remove [wiki abbreviation, name or url](This command is limited to the owner and admins of a server) With this command you can remove a wiki from your server. You can do this by providing either the wiki's abbreviation, name or url (in the formathttps://example.com). -
/wiki page/category/search/all [search] [wiki abbreviation - optional]This command can be used to search any registered wiki for info.
Use a wiki abbreviation if you want to search for a specific wiki. You can see all wikis with '/list'. The default is the English Wikipedia.
Use thepagesubcommand to search for wiki pages with the searched title;
thecategorysubcommand to search for matching categories and pages falling under these categories (if you enter \'all\' you will get all categories);
or thesearchsubcommand to search for wiki pages containing your search in their body.
If you use theallsubcommand page titles, categories and bodies will all be searched.
Example:/wiki mc search creeper- Search a minecraft wiki for all pages containing the word 'creeper'. -
/listUse this command to get a list of all available wikis to this server. The wiki's name and abbreviation will both be displayed. -
/calc [arithmetic sum]Use this command to calculate a simple arithmetical sum, only containing addition '+', subtraction '-', multiplication '*', division '/' and power '^' operators. You can also enclose something in brackets '()' to indicate that that should be calculated first.
Example:/calc (2+3) * 5
- Different embed colors for each added wiki.
Please open an issue on this GitHub or contact me on ramonamerong@live.nl in case you have found any bugs or if you want to provide suggestions for future additions!