mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 04:45:02 +00:00
tags: add support for embeds
This commit is contained in:
parent
7f02aec20c
commit
1cff4fb801
2 changed files with 66 additions and 12 deletions
|
@ -195,6 +195,15 @@ export const tEmbed = t.type({
|
|||
),
|
||||
});
|
||||
|
||||
export type StrictMessageContent = { content?: string; tts?: boolean; disableEveryone?: boolean; embed?: EmbedOptions };
|
||||
|
||||
export const tStrictMessageContent = t.type({
|
||||
content: tNullable(t.string),
|
||||
tts: tNullable(t.boolean),
|
||||
disableEveryone: tNullable(t.boolean),
|
||||
embed: tNullable(tEmbed),
|
||||
});
|
||||
|
||||
export function dropPropertiesByName(obj, propName) {
|
||||
if (obj.hasOwnProperty(propName)) delete obj[propName];
|
||||
for (const value of Object.values(obj)) {
|
||||
|
@ -1017,8 +1026,6 @@ export async function resolveRoleId(bot: Client, guildId: string, value: string)
|
|||
return null;
|
||||
}
|
||||
|
||||
export type StrictMessageContent = { content?: string; tts?: boolean; disableEveryone?: boolean; embed?: EmbedOptions };
|
||||
|
||||
export async function confirm(bot: Client, channel: TextableChannel, userId: string, content: MessageContent) {
|
||||
const msg = await channel.createMessage(content);
|
||||
const reply = await waitForReaction(bot, msg, ["✅", "❌"], userId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue