-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration
Milkshake edited this page Feb 24, 2023
·
3 revisions
Here are explanations for each of the keys in config.json
! If you need a more detailed explanation on what a key is for or how to get the right value for it, feel free to reach out.
Key | What it is |
---|---|
base | These values are critical to proper functioning of the bot or some of its core features (with the exception of wolframAlphaAppId which I need to move out of base eventually). |
base / botToken | The token for your bot. |
base / homeChannel | The ID of the channel where your bot will send messages at startup, like this one. |
base / homeServer | Owner commands are only available in this server. Additionally, slash commands are registered only for this server if you're developing the bot, so you don't have to wait an hour for Discord to cache them. |
base / wolframAlphaAppId | Your App ID from WolframAlpha. This is like an API key, and is required for the /wolframalpha command. This is not required for the bot to function, I just haven't gotten around to moving it out of base . |
base / authorizedUsers | An array of users (user IDs) authorized to run Owner commands. There can be as many users here as you'd like. |
base / sshHosts | An array of servers (format is user@ip-address) to automatically check for and notify of package updates. Only works with distributions that use apt for now. Checks for updates every 6 hours. |
ids | IDs for various things; currently only used to store the channel /feedback sends feedback into. |
ids / feedbackChannel | The ID of the channel that /feedback sends feedback into. |
workerLinks | These values are used for interacting with short links created with Erisa's worker-links. |
workerLinks / baseUrl | Your worker-links base URL. This should look something like https://floatingmilkshake.link . |
workerLinks / secret | Your worker-links secret. |
workerLinks / namespaceId | The Namespace ID of the KV namespace you use to store your short links. |
workerLinks / apiKey | Your Cloudflare API key. |
workerLinks / accountId | Your Cloudflare Account ID. |
workerLinks / email | The email address associated with your Cloudflare account. Used to authenticate for worker-links. |
s3 | These values are used for interacting with an Amazon S3-compatible storage service to store files. |
s3 / bucket | The name of the S3 bucket you'd like the bot to use. This should look something like cdn.floatingmilkshake.com . |
s3 / cdnBaseUrl | The base URL for your S3 bucket. This should look something like https://cdn.floatingmilkshake.com . |
s3 / endpoint | The endpoint URL for your S3 bucket. This can vary. I use Cloudflare R2 and mine looks like this: my_cloudflare_account_id.r2.cloudflarestorage.com
|
s3 / accessKey | The Access Key for your S3 bucket. |
s3 / secretKey | The Secret Key for your S3 bucket. |
s3 / region | The region for your S3 bucket. This should look something like fr-par , us-east , etc. |
cloudflare | These values are used for clearing Cloudflare's cache of files you delete from an S3 bucket with the bot. |
cloudflare / urlPrefix | The URL prefix for your S3 bucket. This should look the same as your s3 / cdnBaseUrl (so something like https://cdn.floatingmilkshake.com ). |
cloudflare / zoneId | The Zone ID for the domain your S3 bucket is in. |
cloudflare / token | A global API token for your Cloudflare account. For some reason a global API token is required to clear this cache, instead of a more specific API key which is what's used for worker-links. |
logs | These values represent various log channels the bot uses to log things like slash command usage or guild joins and leaves. Note that these logs are private; they are not the standard join/leave logs, etc. |
logs / slashCommands | The ID of the channel to log slash command usage to. |
logs / cmdLogExcludedGuilds | IDs for servers you wish to exclude from slash command logs. |
logs / guilds | The ID of the channel to log guild joins and leaves to. |