Discord bot - replit

Hi all,

I was following a bit of FCC Beau’s video but also some other YT. I’m trying to create a bot that sends a message to discord channel to announce an event soon. For testing I used every day instead of Saturday or similar. I finally eliminated all errors but for some reason it doesn’t send announcement. The first part is ok, it send a message when it comes online. but the second part seems not to activate.

import discord
import requests
import json
import random
import time
import datetime
import os
from discord.ext import commands
import schedule
import asyncio
 
client = discord.Client()

@client.event
async def on_ready():
    print("Meow, Chi just woke up. {0.user}".format(client))
    channel = client.get_channel(924361123887714356) 
    await channel.send("Hey, hey,  where are we going today?")

#------------------

@client.event
async def event_sched():
 
  task = schedule.every().day.at("15:51").do(mermen_gvg)
  await task

  while True:
      schedule.run_pending()
      time.sleep(10)
      channel = client.get_channel(924361123887714356)
        
      await message.channel.send("Mermen GvG in 15 mins.")

   
my_secret = os.environ['token']
client.run(my_secret)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.