Now before creating a new group, the bot deletes previously created channels
This commit is contained in:
parent
a9ce6a60b9
commit
d5f378492f
|
@ -61,6 +61,10 @@ async def create(ctx: commands.Context) -> None:
|
||||||
group = await server.create_category(f"{circles_count} Circles of Hell")
|
group = await server.create_category(f"{circles_count} Circles of Hell")
|
||||||
await ctx.send("Creating vc's...", ephemeral=True)
|
await ctx.send("Creating vc's...", ephemeral=True)
|
||||||
if db:
|
if db:
|
||||||
|
channels = db.channels
|
||||||
|
for channel in channels:
|
||||||
|
channel = bot.get_channel(channel)
|
||||||
|
await channel.delete()
|
||||||
db.clear_channels()
|
db.clear_channels()
|
||||||
for circle in range(circles_count):
|
for circle in range(circles_count):
|
||||||
vc = await server.create_voice_channel(f"{circle + 1} Circle", category=group)
|
vc = await server.create_voice_channel(f"{circle + 1} Circle", category=group)
|
||||||
|
|
Loading…
Reference in New Issue