Compare commits
43
Commits
82-uv
..
3f37887345
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f37887345 | ||
|
|
886ac2f7ee | ||
|
|
f06033d2ec | ||
|
|
2ffc4126d2 | ||
|
|
4280ddd841 | ||
|
|
58c167bbe3 | ||
|
|
303e359c32 | ||
|
|
fb460ccc2c | ||
|
|
c5e4a94cd2 | ||
|
|
f95955dc7f | ||
|
|
dfea936aaa | ||
|
|
1df639499c | ||
|
|
be3ec007af | ||
|
|
e8839d2930 | ||
|
|
29eb21b286 | ||
|
|
b7439631d9 | ||
|
|
6b9d8f6ad9 | ||
|
|
c48fba9c85 | ||
|
|
7e3b57f4b6 | ||
|
|
889ba2fd6b | ||
|
|
8b5c954aa5 | ||
|
|
adc44d4466 | ||
|
|
969f380b08 | ||
|
|
10d7014c41 | ||
|
|
89e77a6671 | ||
|
|
c2ff656114 | ||
|
|
81e2957fa5 | ||
|
|
ba24a268ec | ||
|
|
70d262d947 | ||
|
|
6199350cca | ||
|
|
c5e2b39648 | ||
|
|
5db2b43d6a | ||
|
|
b9be9e5470 | ||
|
|
6700199a36 | ||
|
|
8f9821e9c9 | ||
|
|
83af20e04c | ||
|
|
f1dd3cbd3b | ||
|
|
d56251c0b9 | ||
|
|
667a600ec6 | ||
|
|
03a94ca6dd | ||
|
|
9da598e4d9 | ||
|
|
3a280696ca | ||
|
|
8825afdb46 |
@@ -5,19 +5,21 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- '*'
|
- '*'
|
||||||
- '!main'
|
- '!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@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.cheezers.org
|
registry: gitea.cheezers.org
|
||||||
username: imcompiling
|
username: imcompiling
|
||||||
@@ -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@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.cheezers.org
|
registry: gitea.cheezers.org
|
||||||
username: imcompiling
|
username: imcompiling
|
||||||
@@ -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@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.cheezers.org
|
registry: gitea.cheezers.org
|
||||||
username: imcompiling
|
username: imcompiling
|
||||||
@@ -105,7 +105,6 @@ venv/
|
|||||||
ENV/
|
ENV/
|
||||||
env.bak/
|
env.bak/
|
||||||
venv.bak/
|
venv.bak/
|
||||||
poetry.lock
|
|
||||||
|
|
||||||
# Spyder project settings
|
# Spyder project settings
|
||||||
.spyderproject
|
.spyderproject
|
||||||
|
|||||||
Vendored
+2
@@ -3,6 +3,8 @@
|
|||||||
"aiofiles",
|
"aiofiles",
|
||||||
"autofilled",
|
"autofilled",
|
||||||
"blurple",
|
"blurple",
|
||||||
|
"CAKEDAY",
|
||||||
|
"cakedays",
|
||||||
"CLANLEADER",
|
"CLANLEADER",
|
||||||
"Dakiny",
|
"Dakiny",
|
||||||
"DISCORDMANAGER",
|
"DISCORDMANAGER",
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
FROM python:3.12.3-slim
|
FROM python:3.13.3-slim
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install git sqlite3
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install git sqlite3
|
||||||
|
|
||||||
# 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.7.5 /uv /uvx /bin/
|
||||||
|
|
||||||
COPY . /home
|
COPY . /home
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -38,8 +38,8 @@ def run() -> 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("dakiny_bot/cogs"):
|
||||||
bot.load_extension(f"cogs.{folder}")
|
bot.load_extension(f"dakiny_bot.cogs.{folder}")
|
||||||
|
|
||||||
@bot.listen()
|
@bot.listen()
|
||||||
async def on_ready() -> None:
|
async def on_ready() -> None:
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ class Election:
|
|||||||
election_thread: nextcord.Thread = self.guild.get_thread(self.get_election_info().ThreadId)
|
election_thread: nextcord.Thread = self.guild.get_thread(self.get_election_info().ThreadId)
|
||||||
await election_thread.send(message)
|
await election_thread.send(message)
|
||||||
vote_msg = await election_thread.send(
|
vote_msg = await election_thread.send(
|
||||||
build_votes_str(settings, self.guild),
|
build_votes_str(self.guild),
|
||||||
view=VoteView(self.guild),
|
view=VoteView(self.guild),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
# Extend the `pyproject.toml` file in the parent directory...
|
# Extend the `pyproject.toml` file in the parent directory...
|
||||||
extend = "../pyproject.toml"
|
extend = "../../pyproject.toml"
|
||||||
|
|
||||||
# Exclude a variety of commonly ignored directories.
|
# Exclude a variety of commonly ignored directories.
|
||||||
exclude = ["gitea_webhook.py"]
|
exclude = ["gitea_webhook.py"]
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class VoteSelect(nextcord.ui.StringSelect):
|
|||||||
session.execute(stmt)
|
session.execute(stmt)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
vote_message_str = build_votes_str(settings, interaction.guild)
|
vote_message_str = build_votes_str(interaction.guild)
|
||||||
vote_msg: nextcord.Message = await interaction.channel.fetch_message(vote_msg_id)
|
vote_msg: nextcord.Message = await interaction.channel.fetch_message(vote_msg_id)
|
||||||
await vote_msg.edit(content=vote_message_str)
|
await vote_msg.edit(content=vote_message_str)
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
KANDY = 239547993106284544
|
KANDY = 239547993106284544
|
||||||
|
|
||||||
|
IGNORE_CAKEDAY = [266378407682506754]
|
||||||
|
|
||||||
|
|
||||||
class DailyLoop(commands.Cog, name="Daily Loop"):
|
class DailyLoop(commands.Cog, name="Daily Loop"):
|
||||||
"""Class for performing daily functions."""
|
"""Class for performing daily functions."""
|
||||||
@@ -112,7 +114,11 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
|
|||||||
announce_channel: nextcord.TextChannel = guild.get_channel(settings.channel_ids.general)
|
announce_channel: nextcord.TextChannel = guild.get_channel(settings.channel_ids.general)
|
||||||
|
|
||||||
cakedays: list[nextcord.Member] = [
|
cakedays: list[nextcord.Member] = [
|
||||||
human for human in guild.humans if human.joined_at.month == today.month and human.joined_at.day == today.day
|
human
|
||||||
|
for human in guild.humans
|
||||||
|
if human.joined_at.month == today.month
|
||||||
|
and human.joined_at.day == today.day
|
||||||
|
and human.id not in IGNORE_CAKEDAY
|
||||||
]
|
]
|
||||||
|
|
||||||
for member in cakedays:
|
for member in cakedays:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
"""Module controls connection to Dakiny bot database."""
|
||||||
@@ -7,7 +7,7 @@ if not Path("database/dakiny.db").exists():
|
|||||||
with sqlite3.connect("database/dakiny.db") as con:
|
with sqlite3.connect("database/dakiny.db") as con:
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
|
|
||||||
with Path("database_setup/database.sql", encoding="utf-8").open() as file:
|
with Path("dakiny_bot/database/database.sql").open() as file:
|
||||||
database_script = file.read()
|
database_script = file.read()
|
||||||
cur.executescript(database_script)
|
cur.executescript(database_script)
|
||||||
con.commit()
|
con.commit()
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
[tool.ruff]
|
|
||||||
# Extend the `pyproject.toml` file in the parent directory...
|
|
||||||
extend = "../pyproject.toml"
|
|
||||||
|
|
||||||
[tool.ruff.lint]
|
|
||||||
# ignore implicit-namespace-package in this directory.
|
|
||||||
ignore = ["INP001"]
|
|
||||||
+2
-2
@@ -6,10 +6,10 @@ dependencies = [
|
|||||||
"fastapi<1.0.0,>=0.111.0",
|
"fastapi<1.0.0,>=0.111.0",
|
||||||
"nextcord<3.0.0,>=2.6.0",
|
"nextcord<3.0.0,>=2.6.0",
|
||||||
"pandas<3.0.0,>=2.2.2",
|
"pandas<3.0.0,>=2.2.2",
|
||||||
"pytz<2025.0,>=2024.1",
|
"pytz<2025.3,>=2025.2",
|
||||||
"sqlalchemy<3.0.0,>=2.0.30",
|
"sqlalchemy<3.0.0,>=2.0.30",
|
||||||
"aiofiles<24.0.0,>=23.2.1",
|
"aiofiles<24.0.0,>=23.2.1",
|
||||||
"setuptools<71.0.0,>=70.0.0",
|
"setuptools<80.7.2,>=80.7.1",
|
||||||
"dataclass-wizard[yaml]>=0.22.3,<1.0.0",
|
"dataclass-wizard[yaml]>=0.22.3,<1.0.0",
|
||||||
"uvicorn>=0.34.0",
|
"uvicorn>=0.34.0",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"lockFileMaintenance": {
|
||||||
|
"automerge": true,
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"minor": {
|
||||||
|
"automerge": true,
|
||||||
|
"automergeType": "branch"
|
||||||
|
},
|
||||||
|
"patch": {
|
||||||
|
"automerge": true,
|
||||||
|
"automergeType": "branch"
|
||||||
|
},
|
||||||
|
"pin": {
|
||||||
|
"automerge": true,
|
||||||
|
"automergeType": "branch"
|
||||||
|
},
|
||||||
|
"ignoreTests": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user