File tree 1 file changed +2
-6
lines changed
src/modules/recurringMessage 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { CronJob } from 'cron' ;
2
+ import { randomUUID } from 'crypto' ;
2
3
import type {
3
4
ChatInputCommandInteraction ,
4
5
Client ,
@@ -25,8 +26,6 @@ const frequencyDisplay = {
25
26
26
27
const inMemoryJobList : { id : string ; job : CronJob } [ ] = [ ] ;
27
28
28
- const generateId = ( ) => Math . random ( ) . toString ( 36 ) . slice ( 2 ) ;
29
-
30
29
export type Frequency = keyof typeof cronTime ;
31
30
32
31
export const isFrequency = ( frequency : string ) : frequency is Frequency => {
@@ -64,7 +63,7 @@ export const createRecurringMessage = (
64
63
} ;
65
64
66
65
export const addRecurringMessage = async ( interaction : ChatInputCommandInteraction ) => {
67
- const jobId = generateId ( ) ;
66
+ const jobId = randomUUID ( ) ;
68
67
const channelId = interaction . channelId ;
69
68
const frequency = interaction . options . getString ( 'frequency' , true ) ;
70
69
if ( ! isFrequency ( frequency ) ) {
@@ -157,9 +156,6 @@ export const listRecurringMessages = async (interaction: ChatInputCommandInterac
157
156
title : `# ${ channelName } ` ,
158
157
color : 0x0099ff ,
159
158
fields,
160
- footer : {
161
- text : '\u2800' . repeat ( 256 ) , // hackish way have even width for all embeds
162
- } ,
163
159
} ;
164
160
} ) ;
165
161
You can’t perform that action at this time.
0 commit comments