Python bot with a custom prefix
alanchen12

So... I made a python bot that had a changeable prefix and decided to share it here.
You can fork the repl to run it yourself, just fill in 2 fields in the env file:
DISCORD_TOKEN - your bot token
DB_TOKEN - your database token that you can get from https://s1.kognise.dev/token

This bot supports the ability to add multiple prefix's. The only command that it has is a help and a prefix command.
The default prefix is defined at the top of the code with the variable "defaultPrefix"
To use the prefix command, do:
m!prefix
You can add a prefix with
m!prefix add [prefix]
and remove one with
m!prefix remove [prefix].

You could improve this code with less if checks by using @prefix.command(), but I didn't use it

Thanks for stopping by :)

You are viewing a single comment. View All
alanchen12

why tho? they both have the same concept and easypypdb has unlimited keys @programmeruser