mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
Post: don't confirm post commands if the target channel is the same as the command channel
This commit is contained in:
parent
5aa1f3cec9
commit
aab3a0cb1d
1 changed files with 6 additions and 2 deletions
|
@ -261,7 +261,9 @@ export class PostPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
} else {
|
||||
// Post the message immediately
|
||||
await this.postMessage(args.channel, args.content, msg.attachments, args["enable-mentions"]);
|
||||
this.sendSuccessMessage(msg.channel, `Message posted in <#${args.channel.id}>`);
|
||||
if (args.channel.id !== msg.channel.id) {
|
||||
this.sendSuccessMessage(msg.channel, `Message posted in <#${args.channel.id}>`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,7 +351,9 @@ export class PostPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
const createdMsg = await args.channel.createMessage({ embed });
|
||||
this.savedMessages.setPermanent(createdMsg.id);
|
||||
|
||||
await this.sendSuccessMessage(msg.channel, `Embed posted in <#${args.channel.id}>`);
|
||||
if (msg.channel.id !== args.channel.id) {
|
||||
await this.sendSuccessMessage(msg.channel, `Embed posted in <#${args.channel.id}>`);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.content) {
|
||||
|
|
Loading…
Add table
Reference in a new issue