Skip to content

Commit

Permalink
Merge pull request #24 from tresabhi/1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tresabhi authored Aug 11, 2023
2 parents 7e0a2e8 + b426634 commit 8175aa8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 8 additions & 0 deletions docs/changelogs/1.12.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Blitzkrieg 1.12.1

A duo of nasty bugs fixed.

## Fixes

- Fixed a tank index and id mismatch
- Reverted username pattern infrence in command username inputs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blitzkrieg",
"version": "1.12.0",
"version": "1.12.1",
"description": "🎉 All-in-one Discord bot for everything World of Tanks Blitz",
"main": "src/server.ts",
"type": "module",
Expand Down
3 changes: 1 addition & 2 deletions src/core/discord/resolvePlayerFromCommand.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import { Region } from '../../constants/regions';
import listPlayers, {
usernamePattern,
usernamePatternWithoutPosition,
} from '../blitz/listPlayers';
import throwError from '../node/throwError';
Expand All @@ -20,7 +19,7 @@ export default async function resolvePlayerFromCommand(
const displayName = interaction.guild?.members.cache
.get(interaction.user.id)
?.displayName.match(usernamePatternWithoutPosition)?.[0];
const username = commandUsername?.match(usernamePattern)?.[0] ?? displayName;
const username = commandUsername ?? displayName;

if (username === undefined) {
throw throwError(
Expand Down

0 comments on commit 8175aa8

Please sign in to comment.