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 HiCog(commands.Cog, name="Test commands."):
|
||||||
"""Class holds commands for testing."""
|
"""Class holds commands for testing."""
|
||||||
|
|
||||||
def __init__(self, bot: nextcord.Bot) -> None:
|
def __init__(self, bot: commands.Bot) -> None:
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
@nextcord.slash_command()
|
@nextcord.slash_command()
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
|
$REPO_NAME_SNAKE/*
|
||||||
.gitea/workflows/*.yml
|
.gitea/workflows/*.yml
|
||||||
main.py
|
.vscode/launch.json
|
||||||
pyproject.toml
|
pyproject.toml
|
||||||
settings.py
|
|
||||||
Dockerfile
|
Dockerfile
|
||||||
Vendored
+5
-5
@@ -5,11 +5,11 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Python: Module",
|
"name": "Python: Module",
|
||||||
"type": "debugpy",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "${REPO_NAME_SNAKE}.launch",
|
||||||
"module": "main",
|
"module": "main",
|
||||||
"justMyCode": true
|
"justMyCode": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -3,10 +3,10 @@ FROM python:3.12.3-slim
|
|||||||
# install uv
|
# install uv
|
||||||
COPY --from=ghcr.io/astral-sh/uv:0.6.5 /uv /uvx /bin/
|
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
|
# Sync the project into a new environment, using the frozen lockfile
|
||||||
WORKDIR /${REPO_NAME}
|
WORKDIR /${REPO_NAME_SNAKE}
|
||||||
RUN uv sync --frozen --no-dev
|
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