#looking for a autodelete function
1 messages · Page 1 of 1 (latest)
im not really experianced with python yet i am learning
i had this code
@bot.event
async def on_ready():
guilds = bot.guilds
data = {}
for guild in guilds:
data[guild.id] = []
for channel in guild.channels:
data[guild.id].append(channel.id)
with open("result.json", "w") as file:
json.dump(data, file)
that i was fidling around with
cause i want to be able to do !setclean 1H
and it will clear every message in only that channel after 1 hour