3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-17 15:15:02 +00:00

feat: polls

update DJS version, add new permissions, and add `match_polls` option
This commit is contained in:
Ruby 2024-05-12 12:14:02 +02:00
parent b28ca170ed
commit 4252cb5ce0
No known key found for this signature in database
GPG key ID: 74D9DB37B03A4804
10 changed files with 150 additions and 101 deletions

View file

@ -119,6 +119,16 @@ export class GuildSavedMessages extends BaseGuildRepository<SavedMessage> {
}));
}
if (msg.poll) {
data.poll = {
answers: Array.from(msg.poll.answers.values()).map((answer) => ({
id: answer.id,
text: answer.text,
})),
question: msg.poll.question,
};
}
return data;
}

View file

@ -64,6 +64,16 @@ export interface ISavedMessageStickerData {
type: StickerType | null;
}
export interface ISavedMessagePollData {
answers: {
id: number;
text: string | null;
}[];
question: {
text: string;
};
}
export interface ISavedMessageData {
attachments?: ISavedMessageAttachmentData[];
author: {
@ -73,6 +83,7 @@ export interface ISavedMessageData {
content: string;
embeds?: ISavedMessageEmbedData[];
stickers?: ISavedMessageStickerData[];
poll?: ISavedMessagePollData;
timestamp: number;
}