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

feat(tags): remove foreign key from tag_responses, use raw deletion events

This commit is contained in:
Dragory 2021-10-17 11:49:34 +03:00
parent 86b01f2991
commit 8b486e280c
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
5 changed files with 45 additions and 33 deletions

View file

@ -86,4 +86,18 @@ export class GuildTags extends BaseGuildRepository {
response_message_id: responseMessageId,
});
}
async deleteResponseByCommandMessageId(messageId: string): Promise<void> {
await this.tagResponses.delete({
guild_id: this.guildId,
command_message_id: messageId,
});
}
async deleteResponseByResponseMessageId(messageId: string): Promise<void> {
await this.tagResponses.delete({
guild_id: this.guildId,
response_message_id: messageId,
});
}
}