Skip to content

Commit

Permalink
repo init (#1)
Browse files Browse the repository at this point in the history
* set up workspace

* poetry setup

* simple bot start

* makefile

* missing newlines
  • Loading branch information
PerpetualPossum authored Feb 25, 2024
1 parent ab8fd5c commit 61e122e
Show file tree
Hide file tree
Showing 9 changed files with 801 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: black-action
on: [push, pull_request]
jobs:
linter_name:
name: runner / black formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: rickstaa/action-black@v1
with:
black_args: ". --check"
3 changes: 3 additions & 0 deletions .vscode/extentions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["ms-python.black-formatter", "ms-python.isort"]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"python.formatting.provider": "black",
"isort.args": [
"--profile",
"black"
],
"python.analysis.typeCheckingMode": "basic"
}
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
activate:
@echo "Activating virtual environment"
@source venv/bin/activate

deps:
@echo 'Installing requirements'
@poetry install

run:
@echo 'Running the application'
@poetry run python beep_booper

# Personally I use Doppler for managing secrets and configs, so I have a target for that
doppler:
@echo 'Running the application with Doppler'
@poetry run doppler run -- python beep_booper
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# beep-booper
# beep-booper
15 changes: 15 additions & 0 deletions beep_booper/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import discord
import os

intents = discord.Intents.default()
intents.message_content = True

client = discord.Client(intents=intents)


@client.event
async def on_ready():
print(f"We have logged in as {client.user}")


client.run(os.getenv("DISCORD_TOKEN", ""))
722 changes: 722 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tool.poetry]
name = "beep-booper"
version = "0.1.0"
description = ""
authors = ["PerpetualPossum <[email protected]>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
isort = "^5.13.2"
discord-py = {version = "^2.3.2", extras = ["voice"]}
black = "^24.2.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added tests/__init__.py
Empty file.

0 comments on commit 61e122e

Please sign in to comment.