У меня есть код ниже, который я хотел бы, чтобы терминал перезагружался каждые 60 минут (1 час) автоматически. Я использую F5 (atom-python-run), чтобы запустить код вручную.
import discord
from discord.ext import commands
import asyncio
import discord.utils
import datetime
import traceback
import sys
import time
client = commands.Bot(command_prefix = '.')
client.remove_command('help')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('.help for help commands'))
print('Bot is ready.')
@client.command()
async def ping(ctx):
message = await ctx.send(ctx.message.author.mention +' :ping_pong:')
await ctx.message.delete()
await asyncio.sleep(60)
await message.delete()
await ctx.message.delete()