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

Make message with default buttons stateful

This commit is contained in:
Dark 2021-06-08 04:34:32 +02:00
parent 5efdf5ce95
commit 5c7c3c8cba
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
10 changed files with 158 additions and 47 deletions

View file

@ -0,0 +1,14 @@
import { reactionRolesEvt } from "../types";
export const MessageDeletedEvt = reactionRolesEvt({
event: "messageDelete",
allowBots: true,
allowSelf: true,
async listener(meta) {
const pluginData = meta.pluginData;
await pluginData.state.buttonRoles.removeAllForMessageId(meta.args.message.id);
await pluginData.state.reactionRoles.removeFromMessage(meta.args.message.id);
},
});