#Use multiple files

1 messages · Page 1 of 1 (latest)

manic hinge
#

Hi, I need to have multple files on my bot

#

but if I use a command writen on another file than the start file, it's not working and it say that the command isn't found

winter forum
#

you should use cogs and put common functions in a separate file that's not a cog that you can just import

manic hinge
#

here

#

what should I do exactly

#

I import bot ofc

winter forum
#

I don't know what you're asking

#

don't use @bot.command if you're using cogs

manic hinge
#

how should I write it then

winter forum
#

put your commands in cogs

manic hinge
#

what is cogs

winter forum
#

it's a way to organize commands into multiple files

#

?tag ex

winter forum
#

some examples in the repo ^