Python 如何删除多个文本频道?
它只允许我一次删除一个频道,即使一个频道有100个同名频道 第一进口贪婪Python 如何删除多个文本频道?,python,discord,discord.py,Python,Discord,Discord.py,它只允许我一次删除一个频道,即使一个频道有100个同名频道 第一进口贪婪 @client.command(aliases=['d','dc']) async def deletechannel(ctx,name: discord.TextChannel,amount): for i in range (int(amount)): channel = name await channel.delete() 然后 这是关于贪婪的信息 from discord
@client.command(aliases=['d','dc'])
async def deletechannel(ctx,name: discord.TextChannel,amount):
for i in range (int(amount)):
channel = name
await channel.delete()
然后
这是关于贪婪的信息
from discord.ext.commands import Greedy
@client.command(aliases=['d','dc'])
async def deleteChannel(ctx, name: Greedy[discord.TextChannel]):
for i in name:
await i.delete()