jsons-explained
Setting up your API keys
This part is completely optional, however it's necessary for music and a few other features to work properly.
GoogleAPIKey
Required for Youtube Song Search, Playlist queuing, and a few more things.
Follow these steps on how to setup Google API keys:
Go to Google Console and log in.
Create a new project (name does not matter).
Once the project is created, go into
Library
Under the
YouTube APIs
sectionSelect
YouTube Data API v3
,Click enable.
Search for
Custom Search API
Select
Custom Search API
,Click enable.
Open up the
Navigation menu
on the top right with the three lines.select
APIs & Services
, then selectCredentials
,Click
Create Credentials
button,Click on
API Key
A new window will appear with your
Google API key
NOTE: You don't really need to click onRESTRICT KEY
, just click onCLOSE
when you are done.Copy the key.
Open up
creds.yml
and look forGoogleAPIKey
, paste your API key after the:
.It should look like this:
MashapeKey
Required for Hearthstone cards.
Api key obtained on https://rapidapi.com (register -> go to MyApps -> Add New App -> Enter Name -> Application key)
Copy the key and paste it into
creds.yml
OsuApiKey
Required for Osu commands
You can get this key here.
CleverbotApiKey
Required if you want to use Cleverbot. It's currently a paid service.
You can get this key here.
PatreonAccessToken
For Patreon creators only.
PatreonCampaignId
For Patreon creators only. Id of your campaign.
TwitchClientId and TwitchClientSecret
Mandatory for following twitch streams with
.twitch
(or.stadd
with twitch link)Go to apps page on twitch and register your application.
You need 2FA enabled on twitch in order to create an application
You can set
http://localhost
as the OAuth Redirect URL (and press Add button)Select
Chat Bot
from the Category dropdownOnce created,
click Manage
Click
New Secret
and selectOK
in the popup Note: You will need to generate a new Client Secret everytime you exit the pageCopy both to your creds.yml as shown below
LocationIqApiKey
Optional. Used only for the
.time
command. https://locationiq.com api key (register and you will receive the token in the email).
TimezoneDbApiKey
Optional. Used only for the
.time
command. https://timezonedb.com api key (register and you will receive the token in the email YOU HAVE TO ACTIVEATE IT AFTER YOU GET IT).
CoinmarketcapApiKey
Optional. Used only for the
.crypto
command. You can use crypto command without it, but you might get ratelimited from time to time, as all self-hosters share the default api key. https://pro.coinmarketcap.com/
Additional Settings
TotalShards
Required if the bot will be connected to more than 2500 servers.
Most likely unnecessary to change until your bot is added to more than 2500 servers.
RedisOptions
Required if the Redis instance is not on localhost or on non-default port.
You can find all available options here.
RestartCommand
Required if you want to be able to use the
.restart
commandIf you're using the CLI installer or Linux/OSX, it's easier and more reliable setup WizBot with auto-restart and just use
.die
For Windows (Updater), add this to your creds.yml
For Windows (Source), Linux or OSX, add this to your creds.yml
End Result
This is an example of how the creds.yml
looks like with multiple owners, the restart command (optional) and some of the API keys (also optional):
Database
WizBot saves all settings and data in the database file WizBot.db
, located in:
Windows (Updater):
system/data
(can be easily accessed through theData
button on the updater)Windows (Source), Linux and OSX:
wizbot/output/data/WizBot.db
In order to open it you will need SQLite Browser.
NOTE: You don't have to worry if you don't have the WizBot.db
file, it gets automatically created once you successfully run the bot for the first time.
To make changes to the database on windows:
Shut your bot down.
Copy the
WizBot.db
file to someplace safe. (Back up)Open it with SQLite Browser.
Go to the Browse Data tab.
Click on the Table drop-down list.
Choose the table you want to edit.
Click on the cell you want to edit.
Edit it on the right-hand side.
Click on Apply.
Click on Write Changes.
Sharding your bot
To run a sharded bot, you will want to run src/WizBot.Coordinator
project. Shards communicate with the coordinator using gRPC To configure your Coordinator, you will need to edit the src/WizBot.Coordinator/coord.yml
file
Last updated