I'm trying to create a command that allows the user to delete every Text-Channel in their server. I've got an error when running this piece of code.
AttributeError: 'Guild' object has no attribute 'delete_text_channel'
@client.command()
async def test(ctx):
guild = ctx.message.guild
for channel in guild.channels:
guild.delete_text_channel(channel)