I made a discord bot. It check when the message contains words 'kdaj' and 'zoom'. When it does, it will send a message to a server. I am wondering how could I make this program also check if the time is 12:00 then sending another message. Any Ideas? Program:
import discord
intents = discord.Intents.default()
intents.message_content = True
client = discord.Client(intents=intents)
my_secret = 'Here's my key'
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(msg):
print(msg)
msg_words1 = msg.content.split(' ')
msg_words = []
for i in msg_words1:
msg_words.append(i.lower())
if msg.author == client.user:
return
if ('zoom' in msg_words and 'kdaj' in msg_words) or ('zoom' in msg_words and 'kdaj?' in msg_words) or ('zoom?' in msg_words and 'kdaj' in msg_words):
await msg.channel.send('Zoom imamo vsak torek od 16:00 do 17:30')
client.run(my_secret)