mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: cleaned up directories
This commit is contained in:
1 parent
473ebfa46c
commit
613527e78f
41 files changed
+116
-832
No files matched your search
@@ -0,0 +1,8 @@
|
||||
export type TableInput = ([] | [string, string | number])[];
|
||||
|
||||
export default function cleanTable(input: TableInput) {
|
||||
return input
|
||||
.filter((array) => array[1] !== `${-Infinity}`)
|
||||
.map((array) => (array.length === 0 ? '' : `**${array[0]}**: ${array[1]}`))
|
||||
.join('\n');
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import isDev from '../process/isDev.js';
|
||||
|
||||
export default function cmdName(name: string) {
|
||||
return isDev() ? `${name}dev` : name;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { NEGATIVE_COLOR } from '../../constants/colors.js';
|
||||
|
||||
export default function errorEmbed(title: string, description: string) {
|
||||
return new EmbedBuilder()
|
||||
.setColor(NEGATIVE_COLOR)
|
||||
.setTitle(title)
|
||||
.setDescription(description);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import errorEmbed from './errorEmbed.js';
|
||||
|
||||
export const noMember = errorEmbed(
|
||||
'User of command is not a member',
|
||||
'Discord claims that the user of this command does not have an account... strange!',
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
import errorEmbed from './errorEmbed.js';
|
||||
|
||||
export const notTrackedByBlitzStars = errorEmbed(
|
||||
'No data to display',
|
||||
'Player is not tracked by BlitzStars.',
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { SKILLED_COLOR } from '../../constants/colors.js';
|
||||
|
||||
export default function sklldEmbed(title: string, description: string) {
|
||||
return new EmbedBuilder()
|
||||
.setColor(SKILLED_COLOR)
|
||||
.setTitle(title)
|
||||
.setDescription(description);
|
||||
}
|
||||
Reference in new issue
Block a user