Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a26440c4d | ||
|
|
2735d6877f | ||
|
|
117f5655d7 | ||
|
|
c808bb2610 | ||
|
|
5e7b3790eb | ||
|
|
07ea150ad3 | ||
|
|
9280bbfbca | ||
|
|
abf076fceb |
@@ -15,7 +15,7 @@ jobs:
|
|||||||
- 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
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
- 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
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
FROM python:3.12.3-slim
|
FROM python:3.12.3-slim
|
||||||
|
|
||||||
# install uv
|
# install uv
|
||||||
COPY --from=ghcr.io/astral-sh/uv:0.4.30 /uv /uvx /bin/
|
COPY --from=ghcr.io/astral-sh/uv:0.6.2 /uv /uvx /bin/
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install sqlite3
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install sqlite3
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ from nextcord.ext import commands
|
|||||||
from sqlalchemy import exc, select
|
from sqlalchemy import exc, select
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from cogs.submission.submission_views import SubmissionCreateButton
|
|
||||||
from database_setup.sql_data_classes import Category, CategoryGroup, engine
|
from database_setup.sql_data_classes import Category, CategoryGroup, engine
|
||||||
from utilities.utils import MAX_LINE_LENGTH, autofill_groups, send_highscore_message
|
from utilities.utils import MAX_LINE_LENGTH, autofill_groups, send_highscore_message
|
||||||
|
|
||||||
@@ -134,8 +133,7 @@ class CreateCog(commands.Cog, name="Create Cog"):
|
|||||||
try:
|
try:
|
||||||
session.add(new_group)
|
session.add(new_group)
|
||||||
session.commit()
|
session.commit()
|
||||||
message: nextcord.Message = await send_highscore_message(session, interaction.guild, new_group)
|
await send_highscore_message(session, interaction.guild, new_group)
|
||||||
await message.edit(view=SubmissionCreateButton(self._bot))
|
|
||||||
await interaction.response.send_message(f'"{group_name}" has been created!', ephemeral=True)
|
await interaction.response.send_message(f'"{group_name}" has been created!', ephemeral=True)
|
||||||
except exc.IntegrityError:
|
except exc.IntegrityError:
|
||||||
# Category Group already exists in guild
|
# Category Group already exists in guild
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from sqlalchemy import select
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
# pylint: disable=import-error
|
# pylint: disable=import-error
|
||||||
from cogs.submission.submission_views import SubmissionCreateButton
|
|
||||||
from database_setup.sql_data_classes import CategoryGroup, engine
|
from database_setup.sql_data_classes import CategoryGroup, engine
|
||||||
from utilities.utils import autofill_groups, send_highscore_message
|
from utilities.utils import autofill_groups, send_highscore_message
|
||||||
|
|
||||||
@@ -50,9 +49,7 @@ class RefreshCog(commands.Cog, name="Refresh Cog"):
|
|||||||
)
|
)
|
||||||
group = session.scalar(stmt)
|
group = session.scalar(stmt)
|
||||||
|
|
||||||
message: nextcord.Message = await send_highscore_message(session, interaction.guild, group)
|
await send_highscore_message(session, interaction.guild, group)
|
||||||
await message.edit(view=SubmissionCreateButton(self._bot))
|
|
||||||
|
|
||||||
await interaction.response.send_message(f"Updated group {group.GroupName}!", ephemeral=True)
|
await interaction.response.send_message(f"Updated group {group.GroupName}!", ephemeral=True)
|
||||||
|
|
||||||
@refresh.subcommand()
|
@refresh.subcommand()
|
||||||
@@ -77,8 +74,7 @@ class RefreshCog(commands.Cog, name="Refresh Cog"):
|
|||||||
await interaction.response.defer(ephemeral=True)
|
await interaction.response.defer(ephemeral=True)
|
||||||
|
|
||||||
for group in session.scalars(stmt):
|
for group in session.scalars(stmt):
|
||||||
message: nextcord.Message = await send_highscore_message(session, interaction.guild, group)
|
await send_highscore_message(session, interaction.guild, group)
|
||||||
await message.edit(view=SubmissionCreateButton(self._bot))
|
|
||||||
|
|
||||||
await interaction.send(f"Posted all groups in {interaction.guild.name}'s highscores.", ephemeral=True)
|
await interaction.send(f"Posted all groups in {interaction.guild.name}'s highscores.", ephemeral=True)
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ def main() -> None:
|
|||||||
# These need to be enabled in the developer portal as well
|
# These need to be enabled in the developer portal as well
|
||||||
intents = nextcord.Intents.default()
|
intents = nextcord.Intents.default()
|
||||||
|
|
||||||
# Required in order to read messages (eg. prefix commands)
|
|
||||||
intents.message_content = True
|
|
||||||
|
|
||||||
bot = commands.Bot(
|
bot = commands.Bot(
|
||||||
commands.when_mentioned_or(config.BOT_PREFIX),
|
commands.when_mentioned_or(config.BOT_PREFIX),
|
||||||
intents=intents,
|
intents=intents,
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ exclude = [
|
|||||||
"node_modules",
|
"node_modules",
|
||||||
"site-packages",
|
"site-packages",
|
||||||
"venv",
|
"venv",
|
||||||
"dakiny-messages", # Don't need to lint this git repo.
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Same as Black.
|
# Same as Black.
|
||||||
|
|||||||
Reference in New Issue
Block a user