feat: cleaned up directories

This commit is contained in:
TresAbhi committed 2023-05-13 22:01:58 +00:00
1 parent 473ebfa46c
commit 613527e78f
41 files changed
+116 -832

No files matched your search

+8
View File
@@ -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');
}
+5
View File
@@ -0,0 +1,5 @@
import isDev from '../process/isDev.js';
export default function cmdName(name: string) {
return isDev() ? `${name}dev` : name;
}
+9
View File
@@ -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);
}
+6
View File
@@ -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.',
);
+9
View File
@@ -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);
}