Answer the question
In order to leave comments, you need to log in
How to call commands from another file?
I tried it didn't work out. I just need to take commands from 1 file and events from another. And if you can explain without any forums.
import discord
import os
import sys
sys.path.append(os.path.abspath('command'))
from global_sets import * # Импорт основных настроек
from config import command
Answer the question
In order to leave comments, you need to log in
There is such an example, I have functions for commands in the core folder, I just write
import core.utils as command
and for example there is a registration command, I declare the register command and call command.reg ()
I saw cogs (cogs) somewhere but for sure I can't tell you how it works, look it up on Google
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question