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

MessageSaver: make message saving commands non-blocking

This commit is contained in:
Dragory 2018-12-22 14:20:19 +02:00
parent 69ca513aee
commit 7bbe0c7d8d

View file

@ -91,6 +91,7 @@ export class MessageSaverPlugin extends Plugin {
@d.command("save_messages_to_db", "<channel:channel> <ids:string...>")
@d.permission("manage")
@d.nonBlocking()
async saveMessageCmd(msg: Message, args: { channel: GuildChannel & TextChannel; ids: string[] }) {
await msg.channel.createMessage("Saving specified messages...");
@ -110,6 +111,7 @@ export class MessageSaverPlugin extends Plugin {
@d.command("save_pins_to_db", "<channel:channel>")
@d.permission("manage")
@d.nonBlocking()
async savePinsCmd(msg: Message, args: { channel: GuildChannel & TextChannel }) {
await msg.channel.createMessage(`Saving pins from <#${args.channel.id}>...`);