Not sure if I'm doing this in the best way possible, but...
@bot.command(pass_context=True)
async def test2(ctx, txt):
role = discord.utils.get(ctx.message.server.roles, name="{}".format(txt))
if isinstance(role, six.string_types):
await bot.say(role)
else:
await bot.say("False")
await bot.say(role) successfully sends a string(i.e "Member") by itself (no IF statement), but when I compare it to another string it doesn't work. I ended up setting up the line above to test if it's a string and it comes back as false, so I don't really understand what the issue is.
I'm not entirely sure what you're doing, or what your question is. Role will either be an instance of discord.Role or None, if utils.get cannot find something.
Also, issues are not for general coding help. Use the discord server for that. https://discord.gg/r3sSKJJ
six is for python 2 and 3 support so I don't know why you're using that either considering this library is for Python 3 only.
Anyway this isn't an issue with the library.
Most helpful comment
I'm not entirely sure what you're doing, or what your question is. Role will either be an instance of discord.Role or None, if utils.get cannot find something.
Also, issues are not for general coding help. Use the discord server for that. https://discord.gg/r3sSKJJ