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:
parent
b28ca170ed
commit
4252cb5ce0
10 changed files with 150 additions and 101 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue