Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
|
65fbd115fb | |
|
783395e4a5 |
|
@ -220,7 +220,7 @@ The Artificer is built on [Deno](https://deno.land/) `v1.22.0` using [Discordeno
|
|||
|
||||
You will also need to install and setup a MySQL database with a user for the bot to use to add/modify the database. This user must have the "DB Manager" admin rights and "REFERENCES" Global Privileges. Once the DB is installed and a user is setup, run the provided `db\initialize.ts` to create the schema and tables. After this, run `db\populateDefaults.ts` to insert some needed values into the tables.
|
||||
|
||||
Once everything is set up, starting the bot can simply be done with `deno run --allow-net .\mod.ts`.
|
||||
Once everything is set up, starting the bot can simply be done with the command in `start.command`.
|
||||
|
||||
If you choose to run version `1.1.0` or newer, ensure you disable the API in `config.ts` or verify you have properly secured your instance of The Artificer. If you enable the API, you should manually generate a 25 char nanoid and place it in `config.api.adminKey` and copy your `userid` and place it in `config.api.admin` before running `db\populateDefaults.ts`.
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ pidfile="/var/dbots/TheArtificer/artificer.pid"
|
|||
|
||||
artificer_root="/var/dbots/TheArtificer"
|
||||
artificer_write="./logs/,./src/endpoints/gets/heatmap.png"
|
||||
artificer_read="./src/solver/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png"
|
||||
artificer_read="./src/solver/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./deps.ts,./src/mod.d.ts"
|
||||
artificer_log="/var/log/artificer.log"
|
||||
|
||||
artificer_chdir="${artificer_root}"
|
||||
|
|
|
@ -6,7 +6,7 @@ After=network.target
|
|||
[Service]
|
||||
Type=simple
|
||||
PIDFile=/run/deno.pid
|
||||
ExecStart=/root/.deno/bin/deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/solver/,./src/endpoints/gets/heatmap-base.png --allow-net .\mod.ts
|
||||
ExecStart=/root/.deno/bin/deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/solver/,./src/endpoints/gets/heatmap-base.png,./config.ts,./deps.ts,./src/mod.d.ts --allow-net .\mod.ts
|
||||
RestartSec=60
|
||||
Restart=on-failure
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export const config = {
|
||||
'name': 'The Artificer', // Name of the bot
|
||||
'version': '2.1.2', // Version of the bot
|
||||
'version': '2.1.3', // Version of the bot
|
||||
'token': 'the_bot_token', // Discord API Token for this bot
|
||||
'localtoken': 'local_testing_token', // Discord API Token for a secondary OPTIONAL testing bot, THIS MUST BE DIFFERENT FROM "token"
|
||||
'prefix': '[[', // Prefix for all commands
|
||||
|
|
4
mod.ts
4
mod.ts
|
@ -71,7 +71,7 @@ startBot({
|
|||
// Interval to update bot list stats every 24 hours
|
||||
LOCALMODE ? log(LT.INFO, 'updateListStatistics not running') : setInterval(() => {
|
||||
log(LT.LOG, 'Updating all bot lists statistics');
|
||||
intervals.updateListStatistics(botId, cache.guilds.size);
|
||||
intervals.updateListStatistics(botId, cache.guilds.size + cache.dispatchedGuildIds.size);
|
||||
}, 86400000);
|
||||
|
||||
// Interval to update hourlyRates every hour
|
||||
|
@ -89,7 +89,7 @@ startBot({
|
|||
// setTimeout added to make sure the startup message does not error out
|
||||
setTimeout(() => {
|
||||
LOCALMODE && editBotNickname(config.devServer, `LOCAL - ${config.name}`);
|
||||
LOCALMODE ? log(LT.INFO, 'updateListStatistics not running') : intervals.updateListStatistics(botId, cache.guilds.size);
|
||||
LOCALMODE ? log(LT.INFO, 'updateListStatistics not running') : intervals.updateListStatistics(botId, cache.guilds.size + cache.dispatchedGuildIds.size);
|
||||
intervals.updateHourlyRates();
|
||||
intervals.updateHeatmapPng();
|
||||
editBotStatus({
|
||||
|
|
|
@ -1 +1 @@
|
|||
deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/solver/,./src/endpoints/gets/heatmap-base.png --allow-net .\mod.ts
|
||||
deno run --allow-write=./logs/,./src/endpoints/gets/heatmap.png --allow-read=./src/solver/,./src/endpoints/gets/heatmap-base.png,./config.ts,./deps.ts,./src/mod.d.ts --allow-net .\mod.ts
|
Loading…
Reference in New Issue