mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fix some invalid permission checks
This commit is contained in:
parent
fbcf5d7cb8
commit
5ce3e496c3
2 changed files with 10 additions and 10 deletions
|
@ -373,7 +373,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -659,7 +659,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -729,7 +729,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -799,7 +799,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -851,7 +851,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -905,7 +905,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1046,7 +1046,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||||
let mod = msg.member;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("act_as_other", { message: msg })) {
|
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ export class TagsPlugin extends ZeppelinPlugin<ITagsPluginConfig> {
|
||||||
|
|
||||||
async onMessageCreate(msg: SavedMessage) {
|
async onMessageCreate(msg: SavedMessage) {
|
||||||
const member = this.guild.members.get(msg.user_id);
|
const member = this.guild.members.get(msg.user_id);
|
||||||
if (!this.hasPermission("use", { member, channelId: msg.channel_id })) return;
|
if (!this.hasPermission("can_use", { member, channelId: msg.channel_id })) return;
|
||||||
|
|
||||||
if (!msg.data.content) return;
|
if (!msg.data.content) return;
|
||||||
if (msg.is_bot) return;
|
if (msg.is_bot) return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue