mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Fix breaking changes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { GuildChannel, GuildMember, Message, Permissions, TextChannel, MessageActionRow, MessageButton, Interaction, CommandInteraction, Role, ThreadChannel } from "discord.js";
|
import { GuildChannel, GuildMember, Message, Permissions, TextChannel, MessageActionRow, MessageButton, Interaction, CommandInteraction, Role, ThreadChannel, MessageEmbedFooter } from "discord.js";
|
||||||
import App from "..";
|
import App from "..";
|
||||||
import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, makeInfoEmbed, makeErrorEmbed, sendMessage, sendReply, sendMessageOrInteractionResponse } from "../utils/DiscordMessage";
|
import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, makeInfoEmbed, makeErrorEmbed, sendMessage, sendReply, sendMessageOrInteractionResponse } from "../utils/DiscordMessage";
|
||||||
import Logger from "../libs/Logger";
|
import Logger from "../libs/Logger";
|
||||||
@@ -334,7 +334,10 @@ export default class MembershipScreening {
|
|||||||
Guild.MembershipScreening_ApprovalChannel === null ||
|
Guild.MembershipScreening_ApprovalChannel === null ||
|
||||||
Guild.MembershipScreening_GivenRole === null) return;
|
Guild.MembershipScreening_GivenRole === null) return;
|
||||||
|
|
||||||
embed[0].setFooter(`${interaction.user.username} | v${App.version}`, (interaction.user.avatarURL() || ''));
|
embed[0].footer = {
|
||||||
|
text: `${interaction.user.username} | v${App.version}`,
|
||||||
|
iconURL: interaction.user.avatarURL() || ''
|
||||||
|
}
|
||||||
|
|
||||||
if(['approve', 'deny', 'ban'].includes(payload.action)) {
|
if(['approve', 'deny', 'ban'].includes(payload.action)) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MessageEmbed, User, MessagePayload, MessageOptions, TextBasedChannels, TextChannel, DMChannel, BaseGuildTextChannel, Message, ColorResolvable, Interaction, InteractionReplyOptions } from "discord.js";
|
import { MessageEmbed, User, MessagePayload, MessageOptions, GuildTextBasedChannel, TextChannel, DMChannel, BaseGuildTextChannel, Message, ColorResolvable, Interaction, InteractionReplyOptions } from "discord.js";
|
||||||
import App from "..";
|
import App from "..";
|
||||||
import Logger from "../libs/Logger";
|
import Logger from "../libs/Logger";
|
||||||
|
|
||||||
@@ -23,9 +23,14 @@ export function makeEmbed(icon: string | undefined, title: string, description:
|
|||||||
embed.setTimestamp();
|
embed.setTimestamp();
|
||||||
|
|
||||||
if(typeof user !== 'undefined')
|
if(typeof user !== 'undefined')
|
||||||
embed.setFooter(`${user.username} | v${App.version}`, (user.avatarURL() || ''));
|
embed.footer = {
|
||||||
|
text: `${user.username} | v${App.version}`,
|
||||||
|
iconURL: user.avatarURL() || ''
|
||||||
|
}
|
||||||
else
|
else
|
||||||
embed.setFooter(`v${App.version}`, '');
|
embed.footer = {
|
||||||
|
text: `v${App.version}`
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof fields !== 'undefined')
|
if (typeof fields !== 'undefined')
|
||||||
embed.addFields(fields);
|
embed.addFields(fields);
|
||||||
@@ -50,7 +55,7 @@ export function makeInfoEmbed(options: any) {
|
|||||||
return makeEmbed(typeof options.icon === 'undefined' ? "🔮" : options.icon, options.title, options.description, '#C7CEEA', options.fields, options.user, options.setTimestamp || true);
|
return makeEmbed(typeof options.icon === 'undefined' ? "🔮" : options.icon, options.title, options.description, '#C7CEEA', options.fields, options.user, options.setTimestamp || true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function sendMessage(channel: TextChannel | DMChannel | BaseGuildTextChannel | TextBasedChannels, user: User | undefined, options: string | MessagePayload | MessageOptions) {
|
export async function sendMessage(channel: TextChannel | DMChannel | BaseGuildTextChannel | GuildTextBasedChannel, user: User | undefined, options: string | MessagePayload | MessageOptions) {
|
||||||
|
|
||||||
let message;
|
let message;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user