Monday, 8 November 2021

update bot without closing it discord python

I am creating a Discord Bot in Python which posts a random daily fact (or just any fact, really) when the user says "!fact".

my question is that, say I want to add another command like "!foodfact", in which case the bot would give you a strictly food related fact. or maybe something like "!help" so that the bot gives you the list of commands available.

assuming that I have set up the bot with a script, and the bot is active in a terminal, and I have only defined one command(long, I know, but stay with me)

how do I add new commands in the code without having to

a)exit the terminal instance, and

b)edit code and start it again ?

any solution is welcomed.

P.S: this is a personal bot to post facts in a channel in a server

I would be glad to post the source code, but I don't wanna go open source with this just yet...



from update bot without closing it discord python

No comments:

Post a Comment