So i have this script, when a channel is created, it adds on in My_channels
with the get_My_channels
on on_channel_create
, but i don't know how to remove it from My_channels
when a channel with that name is deleted using on_channel_delete
so when a message get's sent to that channel, it won't give me an error that it's an unavailable channel
#When channel is created it works
My_channels=[]
@client.event
async def on_channel_create(GlobalChat):
await get_My_channels() #< That line adds the created channel to My_channels if the channel has the name 'GlobalChat'
But now when channel is deleted is where the error comes
@client.event
async def on_channel_delete(GlobalChat):
await """This is the part it should remove it from My_channels()"""