Files
discordeno/examples/bigbot/.env.example
Fleny 769d50ff93 feat(examples): Migrate example bots to discordeno v19 (#3647)
* Migrate beginner and minimal bot to discordeno v19

* Add .swcrc and fix minimal yarn.lock

* update .gitignore files

* Update nodejs template

Discordeno.js (DD v13) -> DD v19 "raw"

Currently the permission checking is not working correctly

* Fix permission issue

* Rename the templates

* remove unused indents

* Rename starter to beginner

So now it is minimal (main branch) -> beginner

* Really small refactor & eslint fixes (bigbot template)

This is to make my life less miserable at a later time

* mark rabbitMQ plugins as binary files

git seems to be treating them as text

* Add v19 bigbot rest

* Add gateway code

and rabbitmq_message_deduplication v0.6.2 plugin

* fix yarn messy semevr version for @types/amqplib

* clear channel con amqp connection close

* Add bot code for bigbot v19

missing prisma setup, collector setup & language setup

* Add localization

The "command versioning" system works the same say as before, but instead of a command version the code updates the commands every time they change based on the SHA1 of the commands

* Use file relative paths instead of cwd relative paths

* Fix todos

* revert autocomplete tests

* Revert "Add localization"

This reverts commit 2b1da8d2cd.

* move env assertion to config.ts

* Add shard ping to /ping

* fix small issue

* Update readme files

* use Date.now() for the bigbot REST ping

* Remove bigbot v16 code

* Add docker (compose) setup to bigbot template

* remove healthchecks from rest & gateway

* Update dependencies of examples

* Apply readme(s) suggestions from code review

Hopefully i haven't missed any related to markdown files

Co-authored-by: LTS20050703 <lts20050703@gmail.com>

* Apply code suggestions from code review

Co-authored-by: LTS20050703 <lts20050703@gmail.com>

---------

Co-authored-by: LTS20050703 <lts20050703@gmail.com>
2024-07-07 10:40:43 -05:00

143 lines
4.4 KiB
Plaintext

#
# General Configurations
#
# Whether or not this process is a local development version
# In production this value should be set to false
# TEMPLATE-SETUP: When deploying, set this value to false
DEVELOPMENT=true
# The server id where you develop/test the bot
# TEMPLATE-SETUP: Add the id to a server where you develop the bot
DEV_SERVER_ID=
# The discord bot token
# NOTE: It should not be prefixed with Bot
# TEMPLATE-SETUP: Add the bot token here.
DISCORD_TOKEN=
#
# Bot Configuration
#
# NOTE: With "bot code" we refer to the code that will handle the events
# The secret passcode that the bot code is checking for
# This is used to prevent someone else from trying to send malicious events to your bot
# TEMPLATE-SETUP: Add a secret passcode here. It can be whatever you want
EVENT_HANDLER_AUTHORIZATION=
# The host where the event handler will run
# Will be used together with EVENT_HANDLER_PORT to compose the HTTP url to send the events to
# TEMPLATE-SETUP: Set the event handler's host here
EVENT_HANDLER_HOST=localhost
# The port where the event handler will listening for events
# TEMPLATE-SETUP: Set the port where events will be sent
EVENT_HANDLER_PORT=8081
# The full webhook url where the bot can send errors to alert you that the bot is throwing errors.
# TEMPLATE-SETUP: Add the full discord webhook url
BUGS_ERRORS_REPORT_WEBHOOK=
#
# Rest Proxy Configurations
#
# The passcode that the REST proxy is checking for
# This is used to prevent someone else from trying to send malicious API requests from your bot
# TEMPLATE-SETUP: Add a secret passcode here. It can be whatever you want
REST_AUTHORIZATION=
# The host where the REST proxy will run
# Will be used together with REST_PORT to compose the HTTP url to send the API requests to
# TEMPLATE-SETUP: Set the REST proxy's host here
REST_HOST=localhost
# The port where the REST proxy will listen for API requests
# TEMPLATE-SETUP: Set the port where API requests will be sent
REST_PORT=8000
#
# Gateway Proxy Configurations
#
# The amount of shards to start
# Useful with multiple servers where each server is handling a portion of your bot
# OPTIONAL: You can leave this value unspecified if you want this server to manage all shards
# TEMPLATE-SETUP: If you have separate servers, add the number of shards this process should handle
TOTAL_SHARDS=
# The amount of shards to start per worker.
# NOTE: If you are not sure just stick to 16
# TEMPLATE-SETUP: Set how many shards to start per worker
SHARDS_PER_WORKER=16
# The total amount of workers to start.
# NOTE: Generally this should be equal to the number of cores your server has
# TEMPLATE-SETUP: Choose how many workers to start up
TOTAL_WORKERS=4
# The passcode that the gateway is checking for
# This is used to prevent someone else from trying to send malicious messages to your bot
# TEMPLATE-SETUP: Set a secret passcode here. It can be whatever you want
GATEWAY_AUTHORIZATION=
# The host where the gateway will run
# Will be used together with GATEWAY_PORT to compose the HTTP url to send the gateway messages to
# TEMPLATE-SETUP: Set the gateway's host here
GATEWAY_HOST=localhost
# The port where the gateway will listen for gateway messages
# TEMPLATE-SETUP: Set the port where gateway messages will be sent
GATEWAY_PORT=8080
#
# Message queue (RabbitMQ configuration)
#
# Whatever to queue messages from the gateway to bot
# NOTE: If this is set to true, all other configuration in this section are requried
# NOTE: if this is set to false, gateway messages will be sent directly to the bot code, and will fail if the bot code is not running
MESSAGEQUEUE_ENABLE=false
# The url of the RabbitMQ instance
MESSAGEQUEUE_URL=localhost:5672
# Username for the authentication against the RabbitMQ instance
MESSAGEQUEUE_USERNAME=
# Password for the authentication against the RabbitMQ instance
MESSAGEQUEUE_PASSWORD=
#
# Analytics (InfluxDB configuration)
#
# NOTE: This entire section is optional
# TEMPLATE-SETUP: If you want to enable analytics, add the the following values
# The InfluxDB organization
INFLUX_ORG=
# The InfluxDB bucket
INFLUX_BUCKET=
# The InfluxDB secret API token
# NOTE: this may need to be in quotes ("...") if it contains the = sign
INFLUX_TOKEN=
# The InfluxDB Instance url
INFLUX_URL=http://localhost:8086
#
# Docker InfluxDB
#
DOCKER_INFLUXDB_INIT_MODE=setup
DOCKER_INFLUXDB_INIT_USERNAME=discordeno
DOCKER_INFLUXDB_INIT_PASSWORD=discordeno
DOCKER_INFLUXDB_INIT_ORG=discordeno
DOCKER_INFLUXDB_INIT_BUCKET=discordeno
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=discordeno