I'm trying to make a discord bot using the discord.py
module. I have structured my code in so called Cogs and now want to make one for creating text channels. The Bot has the permissions it requires but is not doing anything when I call the command. I also don't get any error message, it just does nothing. Thanks for helping already!
from discord.ext import commands
import discord
class createchannel(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command()
async def create(self, ctx, channel_name):
guild = ctx.message.guild
await guild.create_text_channel(channel_name)
def setup(client):
client.add_cog(createchannel(client))