Improve permission utils, make them bigint-aware
This commit is contained in:
parent
a404c7a97f
commit
8af64a6944
11 changed files with 97 additions and 34 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue