add tag
hacknorris
I'm making a bot which will auto-detect the "muted" role on a server. Servers might have different names for "muted" roles so I thought I detect it via permissions (no voice or messages).

I currently have this:

```python
@bot.command()
@commands.has_permissions(administrator=True)
async def kill(ctx, arg1, member: discord.Member, *, reason=None):
  if arg1 == "-15":
    await member.ban(reason=reason)
  elif arg1 == "-3":
    await member.kick(reason=reason)
#important part ↓
  elif arg1 == "-1":
    role = discord.utils.get(ctx.guild.roles, permissions="send_messages=False, voice=False")
    if role in ctx.guild.roles:
      await member.add_roles(member, role)
    else: 
      await ctx.send("there is no mute role yet. create one without permissions...")
```

This is also throwing the same error:

```python
@bot.command()
@commands.has_permissions(administrator=True)
async def kill(ctx, arg1, member: discord.Member, *, reason=None):
  if arg1 == "-15":
    await member.ban(reason=reason)
  elif arg1 == "-3":
    await member.kick(reason=reason)
#important part ↓
  elif arg1 == "-1":
    role = discord.utils.get(ctx.guild.roles, permissions="")
    if role in ctx.guild.roles:
      await member.add_roles(member, role)
    else: 
      await ctx.send("there is no mute role yet. create one without permissions...")
```

Yes, it's all the command and contains also other features as it's visible. Just last one mute command doesnt work. Everytime I make a role without permissions it throws that there is no such role.

Also, terminal on my desktop/repl.it shown nothing this-bug related (visible only on discord. like one below ↓)

![obraz.png](/image?hash=0f8277864dcafe60c07119f6452eca14bcf11d3dbeda8724ac4fbe33dc4d46c3)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.