Merge branch 'master' of github.com:Dragory/ZeppelinBot

This commit is contained in:
Dragory 2019-06-22 18:52:49 +03:00
commit 6111ecebe1
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -121,6 +121,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<IReactionRolesPluginConf
*/
async applyReactionRoleReactionsToMessage(channelId: string, messageId: string, reactionRoles: ReactionRole[]) {
const channel = this.guild.channels.get(channelId) as TextChannel;
if (!channel) return;
let targetMessage;
try {