Ask coding questions

← Back to all posts
Example Codes (Python) For Discord Bot Commands / features
NoThanks1 (7)

Just need something to work off. Recently started coding so I'm pretty new to all this. Any help you can give will help a tonne!

TheDrone7 (2002)

I have written a tutorial on bots, here's a link, there is also a link to the end product and a hosting tutorial at the end.

themaka (190)

I believe there are several other tutorials in addition to the one by @TheDrone7 -- search through

NoThanks1 (7)

@TheDrone7 I've got the main part of the bot setup (IE the bot coming online and on the server) I just need a sort template of some kind to help out with making commands and all, And the way you showed in your tutorial is different to how I made mine.

TheDrone7 (2002)

@NoThanks1 it depends on which library you're using since you only specified python I assumed that you might be new so I recommended a starter tutorial, please specify which library are you using async or rewrite, also are you using the commands extension provided by these libraries? Or are you using Also, if you're new to programming I really recommend starting with something simple, discord bots seem easy in the beginning but they are really hard when you really get into it.

NoThanks1 (7)

@TheDrone7 I'm using async

TheDrone7 (2002)

@NoThanks1 I recommend using the commands extension as that will make adding commands easier, here's an example. I also recommend shifting to rewrite as it's written for newer versions of python and also has faster execution. Unfortunately adding commands to normal you will have to check for a command using if...else statements in the on_message event.


@TheDrone7 that isn’t working for my bot.