Improve permission utils, make them bigint-aware

This commit is contained in:
Dragory 2020-08-07 00:39:52 +03:00
parent a404c7a97f
commit 8af64a6944
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
11 changed files with 97 additions and 34 deletions

View file

@ -4,7 +4,6 @@ import { errorMessage } from "../../../utils";
import { getBaseUrl, sendErrorMessage } from "../../../pluginUtils";
import moment from "moment-timezone";
import { Constants, TextChannel } from "eris";
import { hasChannelPermissions } from "../../../utils/hasChannelPermissions";
import { canReadChannel } from "../../../utils/canReadChannel";
export const SourceCmd = utilityCmd({
@ -18,7 +17,7 @@ export const SourceCmd = utilityCmd({
},
async run({ message: cmdMessage, args, pluginData }) {
if (!canReadChannel(args.message.channel, cmdMessage.member.id)) {
if (!canReadChannel(args.message.channel, cmdMessage.member)) {
sendErrorMessage(pluginData, cmdMessage.channel, "Unknown message");
return;
}