N
N
Nyxoy2021-12-05 21:04:24
Python
Nyxoy, 2021-12-05 21:04:24

How to display discord bot status?

It is necessary that when I turn off the bot, he writes to the chat (a certain channel) "I'm turning off (here is the time)"
And when I turned it on, he wrote to a certain channel
"I'm turning on! (Time is here)"
How to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-12-06
@Vindicar

Bots usually provide an event to turn on, such as on_ready.
To turn it off, it is really possible to do this only if you turn off the bot with a command. If you just end the bot process, then the bot most likely will not have time to do anything.
The details depend on the library you're using, which you didn't specify.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question