mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Type fix and clean up
This commit is contained in:
+10
-12
@@ -11,8 +11,7 @@ import {
|
|||||||
Message,
|
Message,
|
||||||
ColorResolvable,
|
ColorResolvable,
|
||||||
Interaction,
|
Interaction,
|
||||||
InteractionReplyOptions,
|
InteractionReplyOptions
|
||||||
CommandInteraction
|
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
|
|
||||||
import App from '..';
|
import App from '..';
|
||||||
@@ -29,7 +28,7 @@ interface EmbedData {
|
|||||||
description?: any;
|
description?: any;
|
||||||
color?: ColorResolvable;
|
color?: ColorResolvable;
|
||||||
fields?: any;
|
fields?: any;
|
||||||
user?: User;
|
user?: User | null;
|
||||||
setTimestamp: boolean;
|
setTimestamp: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +38,7 @@ interface EmbedDataPresets {
|
|||||||
description?: any;
|
description?: any;
|
||||||
color?: ColorResolvable;
|
color?: ColorResolvable;
|
||||||
fields?: any;
|
fields?: any;
|
||||||
user?: User;
|
user?: User | null;
|
||||||
setTimestamp?: boolean;
|
setTimestamp?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,15 +80,15 @@ export function makeInfoEmbed(data: EmbedDataPresets) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeSuccessEmbed(options: EmbedDataPresets) {
|
export function makeSuccessEmbed(data: EmbedDataPresets) {
|
||||||
return makeEmbed({
|
return makeEmbed({
|
||||||
icon: !options.icon ? '✅' : options.icon,
|
icon: !data.icon ? '✅' : data.icon,
|
||||||
title: options.title,
|
title: data.title,
|
||||||
description: options.description,
|
description: data.description,
|
||||||
color: '#B5EAD7',
|
color: '#B5EAD7',
|
||||||
fields: options.fields,
|
fields: data.fields,
|
||||||
user: options.user,
|
user: data.user,
|
||||||
setTimestamp: options.setTimestamp || true
|
setTimestamp: data.setTimestamp || true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +207,6 @@ export function getEmotes() {
|
|||||||
return emotes;
|
return emotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function sendReply(rMessage: Message, options: string | MessagePayload | MessageOptions) {
|
async function sendReply(rMessage: Message, options: string | MessagePayload | MessageOptions) {
|
||||||
let message;
|
let message;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user