Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riemannulus/noljaemon
The private bot for the `Noljaeyo` server
https://github.com/riemannulus/noljaemon
Last synced: about 1 month ago
JSON representation
The private bot for the `Noljaeyo` server
- Host: GitHub
- URL: https://github.com/riemannulus/noljaemon
- Owner: riemannulus
- License: mit
- Created: 2021-10-05T18:44:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-12T15:20:50.000Z (about 3 years ago)
- Last Synced: 2023-03-03T04:21:49.520Z (over 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Noljaemon
`Noljaemon` is the private bot for the `Noljaeyo` server.
## How to run
> require python 3.9 or higher
>
1. install dependency
```shell
pip install requirements.txt
```
2. copy `config.example.json` to `.config.json` and edit on your environment.
3. run `main.py`
```shell
python main.py
```## Development
### How to add new commands?
1. goto `bot.exts`
2. find category what you want to add. if not exist, create one.
3. make class and inheritance `discord.ext.command.Cog`.
4. use `@command.command(name="")` decorator on method.
5. make some method with the interface like this: `def setup(bot)` and call `bot.add_cog(YOURCLASS(bot))`Here is some example:
```python
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))
```