Similar Posts

Subscribe
Notify of
2 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
jo135
1 year ago

I don’t know the API, but I can guess something from the code.

You define a class here, but don’t do anything with her. An object of the type MyClient is not created anywhere. So no code is executed.

regex9
1 year ago

Neither do you set up an instance of your class, nor do you call one of their methods (or connect them with events).

You could commands.Bot, instead of discord.Client heir. You give your class another constructor who gives the arguments for intents and command_prefix to the base class. In line 6, it is logical to create an instance of your class.