Author SHA1 Message Date
renovate-bot d4e41763af Update docker/login-action action to v4 2026-03-08 00:01:39 +00:00
renovate-bot 090388cbf3 Update ghcr.io/astral-sh/uv Docker tag to v0.9.28 2026-02-01 00:01:23 +00:00
renovate-bot 64d5ceda03 Update ghcr.io/astral-sh/uv Docker tag to v0.9.26 2026-01-18 00:01:05 +00:00
renovate-bot 8f6ab7d01a Update ghcr.io/astral-sh/uv Docker tag to v0.9.24 2026-01-11 00:01:04 +00:00
renovate-bot c6750e5dbe Update ghcr.io/astral-sh/uv Docker tag to v0.9.21 2026-01-04 00:01:18 +00:00
imcompiling 1e4a300306 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.9.18' (#9) from renovate/ghcr.io-astral-sh-uv-0.x into main
Reviewed-on: #9
Reviewed-by: imcompiling <[email protected]>
2025-12-21 13:25:16 -05:00
renovate-bot 3ffd739124 Update ghcr.io/astral-sh/uv Docker tag to v0.9.18 2025-12-21 00:01:10 +00:00
renovate-bot 2d595e1a96 Update ghcr.io/astral-sh/uv Docker tag to v0.8.23 2025-10-05 04:01:36 +00:00
renovate-bot 6eebce3f2c Update ghcr.io/astral-sh/uv Docker tag to v0.8.22 2025-09-28 04:01:36 +00:00
renovate-bot b08185d943 Update ghcr.io/astral-sh/uv Docker tag to v0.8.19 2025-09-21 04:01:39 +00:00
renovate-bot 8ecd804c90 Update ghcr.io/astral-sh/uv Docker tag to v0.8.17 2025-09-14 04:01:36 +00:00
renovate-bot 21069fa3db Update ghcr.io/astral-sh/uv Docker tag to v0.8.15 2025-09-07 04:01:35 +00:00
renovate-bot 8a06ebd795 Update ghcr.io/astral-sh/uv Docker tag to v0.8.14 2025-08-31 04:02:16 +00:00
renovate-bot bb54fe775b Update python Docker tag to v3.13.7 2025-08-17 04:01:05 +00:00
renovate-bot 380741e8f1 Update ghcr.io/astral-sh/uv Docker tag to v0.8.11 2025-08-17 04:01:00 +00:00
renovate-bot 2ea4f83b44 Update python Docker tag to v3.13.6 2025-08-10 04:01:13 +00:00
renovate-bot 0627803734 Update ghcr.io/astral-sh/uv Docker tag to v0.8.8 2025-08-10 04:01:07 +00:00
renovate-bot 146d8e2230 Update ghcr.io/astral-sh/uv Docker tag to v0.8.4 2025-08-03 04:01:22 +00:00
renovate-bot 6593c7b63e Update ghcr.io/astral-sh/uv Docker tag to v0.8.3 2025-07-27 04:00:53 +00:00
imcompiling 1f60098039 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.8.0' (#7) from renovate/ghcr.io-astral-sh-uv-0.x into main
Reviewed-on: #7
Reviewed-by: imcompiling <[email protected]>
2025-07-21 09:15:34 -04:00
renovate-bot 0ded9fe60e Update ghcr.io/astral-sh/uv Docker tag to v0.8.0 2025-07-20 04:00:55 +00:00
renovate-bot 55f295a40b Update ghcr.io/astral-sh/uv Docker tag to v0.7.20 2025-07-13 04:00:57 +00:00
renovate-bot ad22747130 Update ghcr.io/astral-sh/uv Docker tag to v0.7.19 2025-07-06 04:00:58 +00:00
renovate-bot 7f3c1f06ad Update ghcr.io/astral-sh/uv Docker tag to v0.7.16 2025-06-29 04:00:56 +00:00
renovate-bot 98fa35db7e Update python Docker tag to v3.13.5 2025-06-15 04:01:35 +00:00
renovate-bot 24c32202a0 Update ghcr.io/astral-sh/uv Docker tag to v0.7.13 2025-06-15 04:01:30 +00:00
renovate-bot d5acfe3bc2 Update python Docker tag to v3.13.4 2025-06-08 04:01:32 +00:00
renovate-bot bb6fe8d428 Update ghcr.io/astral-sh/uv Docker tag to v0.7.12 2025-06-08 04:01:27 +00:00
renovate-bot 22e624f3ab Update ghcr.io/astral-sh/uv Docker tag to v0.7.9 2025-06-01 04:01:55 +00:00
renovate-bot ae326f0688 Update ghcr.io/astral-sh/uv Docker tag to v0.7.8 2025-05-25 04:02:04 +00:00
renovate-bot 1d77adb2d5 Update ghcr.io/astral-sh/uv Docker tag to v0.7.5 2025-05-18 04:02:07 +00:00
renovate-bot 5d6a261fa6 Update ghcr.io/astral-sh/uv Docker tag to v0.7.3 2025-05-11 04:02:09 +00:00
imcompiling d056b96fa1 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.2' (#6) from renovate/ghcr.io-astral-sh-uv-0.x into main
Reviewed-on: #6
Reviewed-by: imcompiling <[email protected]>
2025-05-06 14:40:58 -04:00
renovate-bot 7446f81219 Update ghcr.io/astral-sh/uv Docker tag to v0.7.2 2025-05-04 04:02:25 +00:00
renovate-bot b5060e1347 Update ghcr.io/astral-sh/uv Docker tag to v0.6.17 2025-04-27 04:01:55 +00:00
renovate-bot 32fe2f7375 Update python Docker tag to v3.13.3 2025-04-13 14:13:35 +00:00
renovate-bot fa20e99bed Update ghcr.io/astral-sh/uv Docker tag to v0.6.14 2025-04-13 14:13:30 +00:00
renovate-bot e55ead2f09 Update ghcr.io/astral-sh/uv Docker tag to v0.6.12 2025-04-06 04:02:22 +00:00
imcompiling 4d35d0238e Merge pull request 'Update docker/login-action action to v3' (#5) from renovate/docker-login-action-3.x into main
Reviewed-on: #5
Reviewed-by: imcompiling <[email protected]>
2025-03-30 12:40:15 -04:00
renovate-bot b24c0c49fe Update docker/login-action action to v3 2025-03-30 04:02:15 +00:00
renovate-bot 7897a9bd5c Update ghcr.io/astral-sh/uv Docker tag to v0.6.10 2025-03-30 04:02:11 +00:00
imcompiling 2dfc29adbf Merge pull request 'Update python Docker tag to v3.13.2' (#3) from renovate/python-3.x into main
Reviewed-on: #3
Reviewed-by: imcompiling <[email protected]>
2025-03-23 23:38:56 -04:00
imcompiling ca2e558746 Merge pull request 'Update actions/checkout action to v4' (#4) from renovate/actions-checkout-4.x into main
Reviewed-on: #4
Reviewed-by: imcompiling <[email protected]>
2025-03-23 23:37:01 -04:00
renovate-bot 229364faf6 Update actions/checkout action to v4 2025-03-23 04:02:00 +00:00
renovate-bot ad51e3471b Update python Docker tag to v3.13.2 2025-03-23 04:01:59 +00:00
renovate-bot 3b77cbdece Update ghcr.io/astral-sh/uv Docker tag to v0.6.9 2025-03-23 04:01:54 +00:00
imcompiling 6f65ae0d91 Update template to be more python-module like. 2025-03-19 08:44:51 -04:00
imcompiling 582ec6a5f0 use home directory in dockerfile. 2025-03-18 22:01:02 -04:00
imcompiling 1c34d5b87a Correct launch working directory. 2025-03-18 21:49:29 -04:00
imcompiling 3a3e986f0c Update some imports. 2025-03-18 11:20:20 -04:00
imcompiling cb4e4c5522 Add editorconfig. 2025-03-18 11:10:38 -04:00
imcompiling 341298f015 Don't need python dotenv. 2025-03-18 11:05:02 -04:00
imcompiling b64f0bd423 Try double star for repo name directory. 2025-03-18 10:52:02 -04:00
imcompiling da76f5dc0e I put repo name in wrong place. 2025-03-18 10:51:17 -04:00
imcompiling 56406de693 Move things into a repo named module. 2025-03-18 10:48:48 -04:00
imcompiling 5edd4e9a0c Add dockerignore file and update dockerfile to copy all files. 2025-03-17 21:38:19 -04:00
imcompiling b47a7f2282 rename yml files to yaml. 2025-03-17 16:49:12 -04:00
imcompiling 3986230f46 Merge branch 'main' of https://gitea.cheezers.org/imcompiling/discord-bot-template 2025-03-17 16:45:47 -04:00
imcompiling 5e43b1f804 Ignore building on readme edits. 2025-03-17 16:45:38 -04:00
17 changed files with 81 additions and 76 deletions
+1
View File
@@ -0,0 +1 @@
"""Empty init file for ${REPO_NAME_SNAKE} module."""
+14
View File
@@ -0,0 +1,14 @@
"""Starts the app for off_cooldown_bot."""
import logging
from .app import run
nextcord_logger = logging.getLogger("nextcord")
nextcord_logger.setLevel(logging.DEBUG)
nextcord_handler = logging.FileHandler(filename="nextcord.log", encoding="utf-8", mode="w")
nextcord_handler.setFormatter(logging.Formatter("%(asctime)s:%(levelname)s:%(name)s: %(message)s"))
nextcord_logger.addHandler(nextcord_handler)
if __name__ == "__main__":
run()
+4 -15
View File
@@ -1,21 +1,14 @@
"""Main file for bot.""" """Main file for bot."""
import logging
import os import os
import nextcord import nextcord
from nextcord.ext import commands from nextcord.ext import commands
from settings import settings from .settings import settings
nextcord_logger = logging.getLogger("nextcord")
nextcord_logger.setLevel(logging.DEBUG)
nextcord_handler = logging.FileHandler(filename="nextcord.log", encoding="utf-8", mode="w")
nextcord_handler.setFormatter(logging.Formatter("%(asctime)s:%(levelname)s:%(name)s: %(message)s"))
nextcord_logger.addHandler(nextcord_handler)
def main() -> None: def run() -> None:
"""Set config, intents, then connects the bot to discord.""" """Set config, intents, then connects the bot to discord."""
# Allows privileged intents for monitoring members joining, roles editing, and role assignments # Allows privileged intents for monitoring members joining, roles editing, and role assignments
# These need to be enabled in the developer portal as well # These need to be enabled in the developer portal as well
@@ -33,8 +26,8 @@ def main() -> None:
bot = commands.Bot(intents=intents) bot = commands.Bot(intents=intents)
# Get the modules of all cogs whose directory structure is ./cogs/<module_name> # Get the modules of all cogs whose directory structure is ./cogs/<module_name>
for folder in os.listdir("cogs"): for folder in os.listdir(f"${REPO_NAME_SNAKE}/cogs"):
bot.load_extension(f"cogs.{folder}") bot.load_extension(f"${REPO_NAME_SNAKE}.cogs.{folder}")
@bot.listen() @bot.listen()
async def on_ready() -> None: async def on_ready() -> None:
@@ -46,7 +39,3 @@ def main() -> None:
# Run Discord bot # Run Discord bot
bot.run(settings.params.discord_token) bot.run(settings.params.discord_token)
if __name__ == "__main__":
main()
@@ -2,7 +2,7 @@
from nextcord.ext import commands from nextcord.ext import commands
from cogs.commands.hi import HiCog from .hi import HiCog
# This function will be called when this extension is loaded. # This function will be called when this extension is loaded.
@@ -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
View File
@@ -0,0 +1,2 @@
.*
Dockerfile
+16
View File
@@ -0,0 +1,16 @@
# see https://editorconfig.org/
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
+3 -2
View File
@@ -1,4 +1,5 @@
$REPO_NAME_SNAKE/**
.gitea/workflows/*.yml .gitea/workflows/*.yml
main.py .vscode/launch.json
pyproject.toml pyproject.toml
settings.py Dockerfile
@@ -1,19 +1,25 @@
name: build_develop name: build_develop
on: [push] on:
push:
branches:
- "*"
- "!main"
paths-ignore:
- "README.md"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Docker - name: Install Docker
uses: https://github.com/papodaca/install-docker-action@v1 uses: https://github.com/papodaca/install-docker-action@v1
- name: Log into container registry - name: Log into container registry
uses: docker/login-action@v2 uses: docker/login-action@v4
with: with:
registry: gitea.cheezers.org registry: gitea.cheezers.org
username: ${REPO_OWNER} username: ${REPO_OWNER}
@@ -3,19 +3,21 @@ name: build_latest
on: on:
push: push:
branches: [main] branches: [main]
paths-ignore:
- "README.md"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Docker - name: Install Docker
uses: https://github.com/papodaca/install-docker-action@v1 uses: https://github.com/papodaca/install-docker-action@v1
- name: Log into container registry - name: Log into container registry
uses: docker/login-action@v2 uses: docker/login-action@v4
with: with:
registry: gitea.cheezers.org registry: gitea.cheezers.org
username: ${REPO_OWNER} username: ${REPO_OWNER}
@@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Docker - name: Install Docker
uses: https://github.com/papodaca/install-docker-action@v1 uses: https://github.com/papodaca/install-docker-action@v1
- name: Log into container registry - name: Log into container registry
uses: docker/login-action@v2 uses: docker/login-action@v4
with: with:
registry: gitea.cheezers.org registry: gitea.cheezers.org
username: ${REPO_OWNER} username: ${REPO_OWNER}
+2 -1
View File
@@ -3,6 +3,7 @@
"ms-python.vscode-pylance", "ms-python.vscode-pylance",
"ms-python.python", "ms-python.python",
"ms-python.debugpy", "ms-python.debugpy",
"charliermarsh.ruff" "charliermarsh.ruff",
"editorconfig.editorconfig"
] ]
} }
+1 -1
View File
@@ -8,7 +8,7 @@
"name": "Python: Module", "name": "Python: Module",
"type": "debugpy", "type": "debugpy",
"request": "launch", "request": "launch",
"module": "main", "module": "${REPO_NAME_SNAKE}",
"justMyCode": true "justMyCode": true
} }
] ]
+6 -10
View File
@@ -1,16 +1,12 @@
FROM python:3.12.3-slim FROM python:3.13.7-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.9.28 /uv /uvx /bin/
COPY . /home
# Sync the project into a new environment, using the frozen lockfile
WORKDIR /home WORKDIR /home
COPY config.py config.py
COPY main.py main.py
COPY pyproject.toml pyproject.toml
COPY cogs cogs/
RUN uv sync --frozen --no-dev RUN uv sync --frozen --no-dev
CMD ["uv", "run", "./main.py"] CMD ["uv", "run", "--frozen", "--no-dev", "-m", "${REPO_NAME_SNAKE}"]
-22
View File
@@ -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
-1
View File
@@ -6,7 +6,6 @@ authors = [{name="${REPO_OWNER}", email=""}]
readme = "README.md" readme = "README.md"
dependencies = [ dependencies = [
"nextcord>=2.6.0", "nextcord>=2.6.0",
"python-dotenv>=1.0.1",
"sqlmodel>=0.0.22", "sqlmodel>=0.0.22",
"dataclass-wizard[yaml]>=0.22.3,<1.0.0", "dataclass-wizard[yaml]>=0.22.3,<1.0.0",
] ]