mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
MessageSaver: make message saving commands non-blocking
This commit is contained in:
parent
69ca513aee
commit
7bbe0c7d8d
1 changed files with 2 additions and 0 deletions
|
@ -91,6 +91,7 @@ export class MessageSaverPlugin extends Plugin {
|
||||||
|
|
||||||
@d.command("save_messages_to_db", "<channel:channel> <ids:string...>")
|
@d.command("save_messages_to_db", "<channel:channel> <ids:string...>")
|
||||||
@d.permission("manage")
|
@d.permission("manage")
|
||||||
|
@d.nonBlocking()
|
||||||
async saveMessageCmd(msg: Message, args: { channel: GuildChannel & TextChannel; ids: string[] }) {
|
async saveMessageCmd(msg: Message, args: { channel: GuildChannel & TextChannel; ids: string[] }) {
|
||||||
await msg.channel.createMessage("Saving specified messages...");
|
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.command("save_pins_to_db", "<channel:channel>")
|
||||||
@d.permission("manage")
|
@d.permission("manage")
|
||||||
|
@d.nonBlocking()
|
||||||
async savePinsCmd(msg: Message, args: { channel: GuildChannel & TextChannel }) {
|
async savePinsCmd(msg: Message, args: { channel: GuildChannel & TextChannel }) {
|
||||||
await msg.channel.createMessage(`Saving pins from <#${args.channel.id}>...`);
|
await msg.channel.createMessage(`Saving pins from <#${args.channel.id}>...`);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue