import discord from discord.ext import commands import webserver from table_tennis.fedmadtm_scrapping import TableTennisScrapping import os DISCORD_TOKEN = os.getenv('DISCORD_TOKEN') discord_api_key = os.getenv('DISCORD_TOKEN') # Define intents intents = discord.Intents.default() intents.message_content = True # Allows the bot to read message content for responding to commands client = commands.Bot(command_prefix='!', intents=intents) @client.event async def on_ready(): print("The bot is now ready for use!") print("-----------------------------") @client.command() async def nike(ctx): await ctx.send(embed=discord.Embed( title="Recibido mensaje, procesando...", description='', color=discord.Color.blue() )) table_tennis = TableTennisScrapping() message = table_tennis.main() await ctx.send(embed=message) @client.command() async def nextMatch(ctx): await ctx.send(embed=discord.Embed( title="Recibido mensaje, procesando...", description='', color=discord.Color.blue() )) table_tennis = TableTennisScrapping() message = table_tennis.main() await ctx.send(embed=message) webserver.keep_alive() client.run(DISCORD_TOKEN)