Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DiscordBot README for better new dev onboarding process #12

Merged
merged 12 commits into from
Feb 16, 2024
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,26 @@ When you’re done working in the virtual environment, simply type:
```
exit
```

To add missing package to the package list:
```
poetry add your_new_package_name
```

rodonguyen marked this conversation as resolved.
Show resolved Hide resolved
## Discord Bot Development

### Getting started
- [Create a bot in discord](https://interactions-py.github.io/interactions.py/Guides/02%20Creating%20Your%20Bot/)
- Create your own discord server, add that bot to a test server (feel free to use )
rodonguyen marked this conversation as resolved.
Show resolved Hide resolved
- Implement bot logics (and add bot token to your code too)
rodonguyen marked this conversation as resolved.
Show resolved Hide resolved
- Now, run the bot code locally and test the bot on your server

### Auto formatter for Python
We use [Ruff](https://github.com/astral-sh/ruff) for linting and code formating. Ruff is already included and installed when you use `poetry install`. Follow the [instructions here](https://github.com/astral-sh/ruff) to use Ruff.
rodonguyen marked this conversation as resolved.
Show resolved Hide resolved

**TL;DR:**
Just use this before committing new code.
```
poetry run ruff check . # Lint all
poetry run ruff format . # Format all
```
2 changes: 1 addition & 1 deletion poetry.lock
rodonguyen marked this conversation as resolved.
Show resolved Hide resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ litellm = {extras = ["proxy"], version = "^1.23.7"}
openai = "^1.11.1"
python-dotenv = "^1.0.1"
discord-py-interactions = "5.11.0"
ruff = "^0.2.1"
rodonguyen marked this conversation as resolved.
Show resolved Hide resolved

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.6.1"
Expand Down
Loading