E
E
EugenOP2021-09-24 01:30:00
Python
EugenOP, 2021-09-24 01:30:00

AttributeError: module 'discord.guild' has no attribute 'create_text_channel' What should I do?

@bot.event
async def on_message(message):
    if message.channel.id == 845581728218087447:
        await guild.create_text_channel(name='channel',category=845581728663076879)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-09-24
@EugenOP

Because it should not be about the guild module, but about an instance of the Guild class, which can be found in the message.channel.guild attribute.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question