O
O
Oh_noo21952021-10-19 15:06:54
Python
Oh_noo2195, 2021-10-19 15:06:54

How to call in the main file a command that is in a separate file?

I need to put the command in a separate file and call it in the main file, but I don't know how to do it (
Python(discord bot)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PGluk, 2021-10-19
@Oh_noo2195

You transfer the function to a separate file, then you import it in the desired file from file_name import function_name

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question