Noljaemon
Noljaemon
is the private bot for the Noljaeyo
server.
How to run
require python 3.9 or higher
- install dependency
pip install requirements.txt
- copy
config.example.json
to.config.json
and edit on your environment. - run
main.py
python main.py
Development
How to add new commands?
- goto
bot.exts
- find category what you want to add. if not exist, create one.
- make class and inheritance
discord.ext.command.Cog
. - use
@command.command(name="")
decorator on method. - make some method with the interface like this:
def setup(bot)
and callbot.add_cog(YOURCLASS(bot))
Here is some example:
class Latency(commands.Cog):
def __init__(self, bot: Bot) -> None:
self.bot = bot
@commands.command(name="핑")
async def ping(self, ctx: commands.Context) -> None:
embed = Embed(title="Pong!")
await ctx.send(embed=embed)
def setup(bot: Bot) -> None:
"""Load the Latency cog."""
bot.add_cog(Latency(bot))