pull/47/head
Skyler Grey 3 years ago
parent 80ad854a42
commit 21f5229246
Signed by: Minion3665
GPG Key ID: 1AFD10256B3C714D

@ -71,8 +71,7 @@ export const callback = async (interaction: CommandInteraction): Promise<void> =
.setCustomId("edit")
.setLabel("Edit Embed")
.setStyle(ButtonStyle.Secondary)
.setEmoji(getEmojiByName("ICONS.EDIT") as APIMessageComponentEmoji)
,
.setEmoji(getEmojiByName("ICONS.EDIT") as APIMessageComponentEmoji),
new ButtonBuilder()
.setCustomId("send")
.setLabel("Send")
@ -148,7 +147,8 @@ export const callback = async (interaction: CommandInteraction): Promise<void> =
let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction | Discord.StringSelectMenuInteraction;
try {
i = (await interaction.channel!.awaitMessageComponent({
filter: (i: Discord.Interaction) => i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
filter: (i: Discord.Interaction) =>
i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
time: 300000
})) as
| Discord.ButtonInteraction
@ -230,12 +230,14 @@ export const callback = async (interaction: CommandInteraction): Promise<void> =
const channel = interaction.guild!.channels.cache.get(data.channel!) as Discord.TextChannel;
const messageData: MessageCreateOptions = {};
for (const button of data.buttons) {
messageData.components = [new ActionRowBuilder<ButtonBuilder>().addComponents(
messageData.components = [
new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder()
.setCustomId(button)
.setLabel(buttonNames[button]!)
.setStyle(ButtonStyle.Primary)
)];
)
];
}
if (data.title || data.description || data.color) {
const e = new EmojiEmbed();

@ -70,7 +70,8 @@ export const callback = async (interaction: CommandInteraction): Promise<void> =
let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
try {
i = (await interaction.channel!.awaitMessageComponent({
filter: (i: Discord.Interaction) => i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
filter: (i: Discord.Interaction) =>
i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
time: 300000
})) as Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
} catch (e) {

@ -67,7 +67,8 @@ const callback = async (interaction: CommandInteraction): Promise<unknown> => {
let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
try {
i = await interaction.channel!.awaitMessageComponent<ComponentType.Button | ComponentType.ChannelSelect>({
filter: (i: Discord.Interaction) => i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
filter: (i: Discord.Interaction) =>
i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
time: 300000
});
} catch (e) {

@ -23,7 +23,7 @@ declare const config: {
socket?: string;
host?: string;
port?: number;
}
};
};
export default config;

@ -23,13 +23,12 @@ interface MalwareSchema {
errored?: boolean;
}
const nsfw_model = await nsfwjs.load("file://dist/reflex/nsfwjs/example/nsfw_demo/public/model/", { size: 299 });
const clamscanner = await new ClamScan().init({
clamdscan: {
socket: "socket" in config.clamav ? config.clamav.socket as string : false,
host: "host" in config.clamav ? config.clamav.host as string : false,
port: "port" in config.clamav ? config.clamav.port as number : false,
socket: "socket" in config.clamav ? (config.clamav.socket as string) : false,
host: "host" in config.clamav ? (config.clamav.host as string) : false,
port: "port" in config.clamav ? (config.clamav.port as number) : false
}
});

Loading…
Cancel
Save