Skip to content

Commit

Permalink
V2.0.3 - Fix multiline input
Browse files Browse the repository at this point in the history
  • Loading branch information
Burn-E99 committed Jul 9, 2022
1 parent 74b0e28 commit 7b03f31
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Artificer - A Dice Rolling Discord Bot | V2.0.2 - 2022/07/08
# The Artificer - A Dice Rolling Discord Bot | V2.0.3 - 2022/07/09
[![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)

Expand Down
2 changes: 1 addition & 1 deletion config.example.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const config = {
'name': 'The Artificer', // Name of the bot
'version': '2.0.2', // Version of the bot
'version': '2.0.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
Expand Down
2 changes: 1 addition & 1 deletion src/commands/roll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const roll = async (message: DiscordenoMessage, args: string[], command:
}

// Rejoin all of the args and send it into the solver, if solver returns a falsy item, an error object will be substituded in
const rollCmd = `${command} ${args.join(' ')}`;
const rollCmd = message.content.substring(2);

queueRoll(
<QueuedRoll> {
Expand Down
10 changes: 5 additions & 5 deletions src/solver/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,22 @@ export const parseRoll = (fullCmd: string, modifiers: RollModifiers): SolvedRoll

// If maximiseRoll or nominalRoll are on, mark the output as such, else use default formatting
if (modifiers.maxRoll) {
line1 = ` requested the theoretical maximum of: \`${config.prefix}${fullCmd}\``;
line1 = ` requested the theoretical maximum of:\n\`${config.prefix}${fullCmd}\``;
line2 = 'Theoretical Maximum Results: ';
} else if (modifiers.nominalRoll) {
line1 = ` requested the theoretical nominal of: \`${config.prefix}${fullCmd}\``;
line1 = ` requested the theoretical nominal of:\n\`${config.prefix}${fullCmd}\``;
line2 = 'Theoretical Nominal Results: ';
} else if (modifiers.order === 'a') {
line1 = ` requested the following rolls to be ordered from least to greatest: \`${config.prefix}${fullCmd}\``;
line1 = ` requested the following rolls to be ordered from least to greatest:\n\`${config.prefix}${fullCmd}\``;
line2 = 'Results: ';
tempReturnData.sort(compareTotalRolls);
} else if (modifiers.order === 'd') {
line1 = ` requested the following rolls to be ordered from greatest to least: \`${config.prefix}${fullCmd}\``;
line1 = ` requested the following rolls to be ordered from greatest to least:\n\`${config.prefix}${fullCmd}\``;
line2 = 'Results: ';
tempReturnData.sort(compareTotalRolls);
tempReturnData.reverse();
} else {
line1 = ` rolled: \`${config.prefix}${fullCmd}\``;
line1 = ` rolled:\n\`${config.prefix}${fullCmd}\``;
line2 = 'Results: ';
}

Expand Down

0 comments on commit 7b03f31

Please sign in to comment.