perms check for reminder callback

This commit is contained in:
Erik 2022-08-19 18:05:17 +03:00
parent 4c5755e315
commit b67274130e
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -96,7 +96,7 @@ class GuildWrapper {
async _reminder({ reminder, user, channel, id }) { async _reminder({ reminder, user, channel, id }) {
channel = await this.resolveChannel(channel); channel = await this.resolveChannel(channel);
if (channel) await channel.send({ if (channel && channel.permissionsFor(this.client.user).has(['ViewChannel', 'SendMessages'])) await channel.send({
content: `<@${user}>`, content: `<@${user}>`,
embeds: [{ embeds: [{
title: this.format('GENERAL_REMINDER_TITLE'), title: this.format('GENERAL_REMINDER_TITLE'),