Template
Move things into a repo named module.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""Empty init file for ${REPO_NAME_SNAKE} module."""
|
||||
@@ -7,7 +7,7 @@ from nextcord.ext import commands
|
||||
class HiCog(commands.Cog, name="Test commands."):
|
||||
"""Class holds commands for testing."""
|
||||
|
||||
def __init__(self, bot: nextcord.Bot) -> None:
|
||||
def __init__(self, bot: commands.Bot) -> None:
|
||||
self.bot = bot
|
||||
|
||||
@nextcord.slash_command()
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
$REPO_NAME_SNAKE/*
|
||||
.gitea/workflows/*.yml
|
||||
main.py
|
||||
.vscode/launch.json
|
||||
pyproject.toml
|
||||
settings.py
|
||||
Dockerfile
|
||||
Vendored
+5
-5
@@ -5,11 +5,11 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Module",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "main",
|
||||
"justMyCode": true
|
||||
"name": "Python: Module",
|
||||
"type": "debugpy",
|
||||
"request": "${REPO_NAME_SNAKE}.launch",
|
||||
"module": "main",
|
||||
"justMyCode": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+3
-3
@@ -3,10 +3,10 @@ FROM python:3.12.3-slim
|
||||
# install uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.6.5 /uv /uvx /bin/
|
||||
|
||||
COPY . /${REPO_NAME}
|
||||
COPY . /${REPO_NAME_SNAKE}
|
||||
|
||||
# Sync the project into a new environment, using the frozen lockfile
|
||||
WORKDIR /${REPO_NAME}
|
||||
WORKDIR /${REPO_NAME_SNAKE}
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
CMD ["uv", "run", "./main.py"]
|
||||
CMD ["uv", "run", "./${REPO_NAME_SNAKE}/main.py"]
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
"""
|
||||
File contains classes defining the Hydra configuraton structure.
|
||||
"""
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Params:
|
||||
"""
|
||||
Class defines the various configuration parameters.
|
||||
"""
|
||||
|
||||
discord_token: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class BotConfig:
|
||||
"""
|
||||
Class defines all configs required for Dakiny Bot.
|
||||
"""
|
||||
|
||||
params: Params
|
||||
Reference in New Issue
Block a user