From c4c709847968c1669f70702373842c0dc6117cf9 Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Fri, 8 Jul 2022 23:51:31 -0400 Subject: [PATCH] V2.0.1 - Fix parens, update guild audit command --- README.md | 2 +- config.example.ts | 4 ++-- src/commands/auditCmd/auditGuilds.ts | 5 +++++ src/solver/parser.ts | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 958d4f9..5ad4743 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# The Artificer - A Dice Rolling Discord Bot | V2.0.0 - 2022/07/05 +# The Artificer - A Dice Rolling Discord Bot | V2.0.1 - 2022/07/08 [![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg)](https://sonarcloud.io/summary/new_code?id=TheArtificer) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=TheArtificer&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=TheArtificer) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=TheArtificer&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=TheArtificer) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=TheArtificer&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=TheArtificer) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=TheArtificer&metric=bugs)](https://sonarcloud.io/summary/new_code?id=TheArtificer) [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=TheArtificer&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=TheArtificer) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=TheArtificer&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=TheArtificer) diff --git a/config.example.ts b/config.example.ts index 09f3f1d..18c0fde 100644 --- a/config.example.ts +++ b/config.example.ts @@ -1,12 +1,12 @@ export const config = { 'name': 'The Artificer', // Name of the bot - 'version': '2.0.0', // Version of the bot + 'version': '2.0.1', // 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 'postfix': ']]', // Postfix for rolling command 'limits': { // Limits for the bot functions - 'maxLoops': 10000000, // Determines how long the bot will attempt a roll, number of loops before it kills a roll. Increase this at your own risk, originally was set to 5 Million before rollWorkers were added, increased to 10 Million since multiple rolls can be handled concurrently + 'maxLoops': 5000000, // Determines how long the bot will attempt a roll, number of loops before it kills a roll. Increase this at your own risk, originally was set to 5 Million before rollWorkers were added, increased to 10 Million since multiple rolls can be handled concurrently 'maxWorkers': 16, // Maximum number of worker threads to spawn at once (Set this to less than the number of threads your CPU has, Artificer will eat it all if too many rolls happen at once) 'workerTimeout': 300000, // Maximum time before the bot kills a worker thread in ms }, diff --git a/src/commands/auditCmd/auditGuilds.ts b/src/commands/auditCmd/auditGuilds.ts index bc55f3b..9db6fc3 100644 --- a/src/commands/auditCmd/auditGuilds.ts +++ b/src/commands/auditCmd/auditGuilds.ts @@ -79,6 +79,11 @@ Please see attached file for audit details on cached guilds and members.`, value: `${botsCount}`, inline: true, }, + { + name: 'Average members per guild:', + value: `${(totalCount / cache.guilds.size).toFixed(2)}`, + inline: true, + }, ], }], file: { diff --git a/src/solver/parser.ts b/src/solver/parser.ts index 750bf09..a214b9f 100644 --- a/src/solver/parser.ts +++ b/src/solver/parser.ts @@ -15,7 +15,7 @@ import { fullSolver } from './solver.ts'; // parseRoll(fullCmd, modifiers) // parseRoll handles converting fullCmd into a computer readable format for processing, and finally executes the solving export const parseRoll = (fullCmd: string, modifiers: RollModifiers): SolvedRoll => { - const operators = ['^', '*', '/', '%', '+', '-']; + const operators = ['^', '*', '/', '%', '+', '-', '(', ')']; const returnmsg = { error: false, errorCode: '',