Skip to content

Commit 47b81ca

Browse files
chore: cleaned up codebase (#30)
1 parent 587862f commit 47b81ca

File tree

8 files changed

+7
-206
lines changed

8 files changed

+7
-206
lines changed

src/bot/commands/flower.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,16 @@ function createFlowerEmbed(
371371
displayName: string,
372372
attachmentData?: { url: string; contentType: string; filename: string },
373373
): EmbedBuilder {
374+
const footerText =
375+
displayName === 'Anonymous'
376+
? 'Thank you for celebrating with us! 🌸'
377+
: `Submitted by ${displayName}\nThank you for celebrating with us! 🌸`;
378+
374379
const embed = new EmbedBuilder()
375380
.setColor('#FF69B4') // Pink color for flowers
376381
.setTitle('🌸🌺🌼💐')
377382
.setDescription(message)
378-
.setFooter({ text: `Submitted by ${displayName} • Thank you for celebrating with us! 🌸` });
383+
.setFooter({ text: footerText });
379384

380385
// Add image if provided
381386
if (attachmentData) {

src/bot/commands/ping.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/bot/commands/poll.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/bot/commands/serverinfo.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/bot/commands/userinfo.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/bot/commands/welcome.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/bot/index.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import {
88
handleFlowerConsentButton,
99
handleFlowerShareUsernameButton,
1010
} from './commands/flower.js';
11-
import { pingCommand } from './commands/ping.js';
12-
import { pollCommand } from './commands/poll.js';
13-
import { serverinfoCommand } from './commands/serverinfo.js';
14-
import { userinfoCommand } from './commands/userinfo.js';
15-
import { welcomeCommand } from './commands/welcome.js';
1611
import {
1712
handleFlowerChannelMessage,
1813
handleModerationApprove,
@@ -105,21 +100,6 @@ client.on('interactionCreate', async (interaction: Interaction) => {
105100

106101
try {
107102
switch (interaction.commandName) {
108-
case 'ping':
109-
await pingCommand(interaction);
110-
break;
111-
case 'serverinfo':
112-
await serverinfoCommand(interaction);
113-
break;
114-
case 'userinfo':
115-
await userinfoCommand(interaction);
116-
break;
117-
case 'poll':
118-
await pollCommand(interaction);
119-
break;
120-
case 'welcome':
121-
await welcomeCommand(interaction);
122-
break;
123103
case 'flower':
124104
await flowerCommand(interaction);
125105
break;

src/bot/registerCommands.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,8 @@ import 'dotenv/config';
33
import { REST, Routes } from 'discord.js';
44

55
import { flower } from './commands/flower.js';
6-
import { ping } from './commands/ping.js';
7-
import { poll } from './commands/poll.js';
8-
import { serverinfo } from './commands/serverinfo.js';
9-
import { userinfo } from './commands/userinfo.js';
10-
import { welcome } from './commands/welcome.js';
116

12-
const commands = [
13-
ping.toJSON(),
14-
serverinfo.toJSON(),
15-
userinfo.toJSON(),
16-
poll.toJSON(),
17-
welcome.toJSON(),
18-
flower.toJSON(),
19-
];
7+
const commands = [flower.toJSON()];
208

219
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
2210

0 commit comments

Comments
 (0)