create a role with discord.py
@client.command(aliases=['make_role']) @commands.has_permissions(manage_roles=True) # Check if the user executing the command can manage roles async def create_role(ctx, *, name): guild = ctx.guild await guild.create_role(name=name) await ctx.send(f'Role `{name}` has been created')
python discord
import discord class MyClient(discord.Client): async def on_ready(self): print('Logged on as', self.user) async def on_message(self, message): # don't respond to ourselves if message.author == self.user: return if message.content == 'ping': await message.channel.send('pong') client = MyClient() client.run('token')
Source: pypi.org
icon discord.py
print("porn is good")