Skip to content

Commit 0ba058f

Browse files
fix: remove width hack (#66)
1 parent 6fa4019 commit 0ba058f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/modules/recurringMessage/recurringMessage.helpers.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { CronJob } from 'cron';
2+
import { randomUUID } from 'crypto';
23
import type {
34
ChatInputCommandInteraction,
45
Client,
@@ -25,8 +26,6 @@ const frequencyDisplay = {
2526

2627
const inMemoryJobList: { id: string; job: CronJob }[] = [];
2728

28-
const generateId = () => Math.random().toString(36).slice(2);
29-
3029
export type Frequency = keyof typeof cronTime;
3130

3231
export const isFrequency = (frequency: string): frequency is Frequency => {
@@ -64,7 +63,7 @@ export const createRecurringMessage = (
6463
};
6564

6665
export const addRecurringMessage = async (interaction: ChatInputCommandInteraction) => {
67-
const jobId = generateId();
66+
const jobId = randomUUID();
6867
const channelId = interaction.channelId;
6968
const frequency = interaction.options.getString('frequency', true);
7069
if (!isFrequency(frequency)) {
@@ -157,9 +156,6 @@ export const listRecurringMessages = async (interaction: ChatInputCommandInterac
157156
title: `# ${channelName}`,
158157
color: 0x0099ff,
159158
fields,
160-
footer: {
161-
text: '\u2800'.repeat(256), // hackish way have even width for all embeds
162-
},
163159
};
164160
});
165161

0 commit comments

Comments
 (0)