I have a bunch of servers where I would like to delete all the roles that I previously made, but their number leaves much to be desired...
Instead of the traditional mentioning of said roles (which is flawed, and quite slow) I haven't been able to find out how to code it so the command can be run and all roles below the bot can be deleted, automatically.
code I came up with:
async def delrole(ctx, *, roles: discord.Role):
for role in roles:
try:
await client.delete_role(ctx.message.guild, role)
except discord.Forbidden:
await client.say("Cannot delete this role!")
Any input would be much appreciated! Thanks