generated from KevinNovak/Discord-Bot-TypeScript-Template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from tresabhi/1.12.2
- Loading branch information
Showing
27 changed files
with
1,600 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Blitzkrieg 1.12.2 | ||
|
||
A much needed room service is here! | ||
|
||
## Changes | ||
|
||
- Tier selection is now easier | ||
- Tier options across all commands have been unified to a single style | ||
- Tiers are now sorted from `10` to `1` | ||
- Tiers now show up in the format `Tier {tier_number} - {tier_roman_numeral}` (example: `Tier 8 - VIII`) | ||
- Removed powered by footer as links are provided regardless | ||
- Changed invite instructions to instead use application directory | ||
|
||
## Fixes | ||
|
||
- Guide link on the website is now fixed | ||
- Versions now show up in the correct order in the navigation bar | ||
- Added Blitzkrieg's GitHub link instead of the default Vitepress | ||
- Changed examples to guide in the navigation bar | ||
- Clan name and icon now show up with multi-tank filters | ||
- Removed a random `console.log` | ||
|
||
## Technical Changes | ||
|
||
- Added `knip` | ||
- Removed a lot of unused files and dependencies | ||
- Updated all dependencies to their latest | ||
- Code split `bot.ts` | ||
- `client` and `octokit` now reside separately |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
# Inviting the Bot | ||
|
||
It's quite simple really. Just follow the steps below: | ||
|
||
1. Join a Discord server that already has Blitzkrieg installed or [the official Discord Server](https://discord.gg/nDt7AjGJQH). | ||
2. Click on the bot's profile. | ||
3. Click the "Add to Server" button under the bot's name and ID. | ||
4. Select what server you want it in and see what permissions you seem fit for the bot. | ||
|
||
Voila! You're ready to go. | ||
Go to [application directory for Blitzkrieg](https://discord.com/application-directory/1097673957865443370) and click "Add to Server." Voila! You're ready to go. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
import { Octokit } from '@octokit/rest'; | ||
import { Client, GatewayIntentBits } from 'discord.js'; | ||
import { client } from './core/discord/client'; | ||
import { secrets } from './core/node/secrets'; | ||
import { registerErrorHandlers } from './events/error'; | ||
import guildMemberAdd from './events/guildMemberAdd'; | ||
import interactionCreate from './events/interactionCreate'; | ||
import ready from './events/ready'; | ||
|
||
export const client = new Client({ | ||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers], | ||
}) | ||
.on('ready', ready) | ||
.on('guildMemberAdd', guildMemberAdd) | ||
.on('interactionCreate', interactionCreate); | ||
|
||
export const octokit = new Octokit({ auth: secrets.GH_TOKEN }); | ||
|
||
registerErrorHandlers(); | ||
client.login(secrets.DISCORD_TOKEN); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Thanks, August! | ||
* https://stackoverflow.com/a/41358305/12294756 | ||
*/ | ||
const ROMAN = { | ||
M: 1000, | ||
CM: 900, | ||
D: 500, | ||
CD: 400, | ||
C: 100, | ||
XC: 90, | ||
L: 50, | ||
XL: 40, | ||
X: 10, | ||
IX: 9, | ||
V: 5, | ||
IV: 4, | ||
I: 1, | ||
}; | ||
const ROMAN_KEYS = Object.keys(ROMAN) as (keyof typeof ROMAN)[]; | ||
|
||
export default function numberToRomanNumeral(value: number) { | ||
let string = ''; | ||
|
||
ROMAN_KEYS.forEach((index) => { | ||
const part = Math.floor(value / ROMAN[index]); | ||
value -= part * ROMAN[index]; | ||
string += index.repeat(part); | ||
}); | ||
|
||
return string; | ||
} |
Oops, something went wrong.