fix permissions
This commit is contained in:
		
							parent
							
								
									23ac2e3838
								
							
						
					
					
						commit
						dc954a3f60
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -179,7 +179,7 @@ settings.callback = async function (msg, line, [cmd, key, value]) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    case "enable": {
 | 
					    case "enable": {
 | 
				
			||||||
      if (
 | 
					      if (
 | 
				
			||||||
        !msg.channel.permissionsOf(msg.author.id).has("MANAGE_GUILD") &&
 | 
					        !msg.channel.permissionsOf(msg.author.id).has("manageGuild") &&
 | 
				
			||||||
        !hf.config.elevated.includes(msg.author.id)
 | 
					        !hf.config.elevated.includes(msg.author.id)
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
        return "You do not have `Manage Server` permissions";
 | 
					        return "You do not have `Manage Server` permissions";
 | 
				
			||||||
| 
						 | 
					@ -194,7 +194,7 @@ settings.callback = async function (msg, line, [cmd, key, value]) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    case "disable": {
 | 
					    case "disable": {
 | 
				
			||||||
      if (
 | 
					      if (
 | 
				
			||||||
        !msg.channel.permissionsOf(msg.author.id).has("MANAGE_GUILD") &&
 | 
					        !msg.channel.permissionsOf(msg.author.id).has("manageGuild") &&
 | 
				
			||||||
        !hf.config.elevated.includes(msg.author.id)
 | 
					        !hf.config.elevated.includes(msg.author.id)
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
        return "You do not have `Manage Server` permissions";
 | 
					        return "You do not have `Manage Server` permissions";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,10 +10,10 @@ tidy.category = CATEGORY;
 | 
				
			||||||
tidy.helpText = "Clean up messages";
 | 
					tidy.helpText = "Clean up messages";
 | 
				
			||||||
tidy.usage = "[subcommand] <count> <extra>";
 | 
					tidy.usage = "[subcommand] <count> <extra>";
 | 
				
			||||||
tidy.callback = async function (msg, line, [subcommand, count, extra]) {
 | 
					tidy.callback = async function (msg, line, [subcommand, count, extra]) {
 | 
				
			||||||
  if (!msg.channel.permissionsOf(msg.author.id).has("MANAGE_MESSAGES")) {
 | 
					  if (!msg.channel.permissionsOf(msg.author.id).has("manageMessages")) {
 | 
				
			||||||
    return "You do not have `Manage Messages` permission.";
 | 
					    return "You do not have `Manage Messages` permission.";
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (!msg.channel.permissionsOf(hf.bot.user.id).has("MANAGE_MESSAGES")) {
 | 
					  if (!msg.channel.permissionsOf(hf.bot.user.id).has("manageMessages")) {
 | 
				
			||||||
    return "I do not have `Manage Messages` permission.";
 | 
					    return "I do not have `Manage Messages` permission.";
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue