Compare commits

...
Author SHA1 Message Date
renovate-bot 5f24331600 Update actions/checkout action to v7 2026-06-21 00:01:25 +00:00
imcompiling 8016b034ac Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.9.18' (#110) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 1m7s
Reviewed-on: #110
Reviewed-by: imcompiling <[email protected]>
2025-12-21 13:25:35 -05:00
renovate-bot 5f4fcc28ae Update ghcr.io/astral-sh/uv Docker tag to v0.9.18 2025-12-21 00:00:43 +00:00
imcompiling a99a76a3e0 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.9.17' (#108) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 1m10s
Reviewed-on: #108
Reviewed-by: imcompiling <[email protected]>
2025-12-16 21:38:06 -05:00
renovate-bot b7028c112d Update ghcr.io/astral-sh/uv Docker tag to v0.9.17 2025-12-14 00:00:41 +00:00
imcompiling 2229a383c5 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.8.11' (#106) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 1m4s
Reviewed-on: #106
Reviewed-by: imcompiling <[email protected]>
2025-08-20 10:27:41 -04:00
renovate-bot ea1f1a5b3d Update ghcr.io/astral-sh/uv Docker tag to v0.8.11 2025-08-17 04:00:35 +00:00
imcompiling db2657a5b3 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.8.3' (#105) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 59s
Reviewed-on: #105
Reviewed-by: imcompiling <[email protected]>
2025-07-28 09:03:36 -04:00
renovate-bot ff2c233381 Update ghcr.io/astral-sh/uv Docker tag to v0.8.3 2025-07-27 04:00:33 +00:00
imcompiling ab9176b10d Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.8.0' (#104) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 1m8s
Reviewed-on: #104
Reviewed-by: imcompiling <[email protected]>
2025-07-21 09:15:11 -04:00
renovate-bot 7c77603711 Update ghcr.io/astral-sh/uv Docker tag to v0.8.0 2025-07-20 04:00:40 +00:00
imcompiling 5cc41b8e8c Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.20' (#103) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 59s
Reviewed-on: #103
Reviewed-by: imcompiling <[email protected]>
2025-07-15 09:03:32 -04:00
renovate-bot d470ca3a8f Update ghcr.io/astral-sh/uv Docker tag to v0.7.20 2025-07-13 04:00:39 +00:00
imcompiling f2d55f435d Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.12' (#102) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 57s
Reviewed-on: #102
Reviewed-by: imcompiling <[email protected]>
2025-06-09 09:09:31 -04:00
renovate-bot ea63c5ea88 Update ghcr.io/astral-sh/uv Docker tag to v0.7.12 2025-06-08 04:01:08 +00:00
imcompiling b01616f744 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.9' (#101) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 57s
Reviewed-on: #101
Reviewed-by: imcompiling <[email protected]>
2025-06-02 09:28:57 -04:00
renovate-bot 811ec5c7ee Update ghcr.io/astral-sh/uv Docker tag to v0.7.9 2025-06-01 04:01:08 +00:00
imcompiling 1950bcdc16 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.8' (#100) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 1m5s
Reviewed-on: #100
Reviewed-by: imcompiling <[email protected]>
2025-05-28 08:29:50 -04:00
renovate-bot 972ecef2be Update ghcr.io/astral-sh/uv Docker tag to v0.7.8 2025-05-25 04:01:09 +00:00
imcompiling 540efc8819 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.5' (#99) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 1m2s
Reviewed-on: #99
Reviewed-by: imcompiling <[email protected]>
2025-05-21 11:20:30 -04:00
renovate-bot 7d02608a14 Update ghcr.io/astral-sh/uv Docker tag to v0.7.5 2025-05-18 04:01:11 +00:00
imcompiling 7861e498c5 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.7.3' (#98) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 57s
Reviewed-on: #98
Reviewed-by: imcompiling <[email protected]>
2025-05-12 09:53:13 -04:00
renovate-bot dd28de3cac Update ghcr.io/astral-sh/uv Docker tag to v0.7.3 2025-05-11 04:01:21 +00:00
imcompiling cf872c071b Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.6.17' (#97) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 56s
Reviewed-on: #97
Reviewed-by: imcompiling <[email protected]>
2025-04-28 12:13:06 -04:00
renovate-bot 6c6b5cac25 Update ghcr.io/astral-sh/uv Docker tag to v0.6.17 2025-04-27 04:01:07 +00:00
imcompiling 50ce8fbfa3 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.6.14' (#95) from renovate/ghcr.io-astral-sh-uv-0.x into main
Reviewed-on: #95
2025-04-13 10:32:24 -04:00
renovate-bot d0ef8e723f Update ghcr.io/astral-sh/uv Docker tag to v0.6.14 2025-04-13 14:13:11 +00:00
imcompiling c434154d84 Merge branch '90-00-in-score'
build_latest / build (push) Successful in 32s
build_release / build (push) Successful in 17s
2025-04-11 09:10:28 -04:00
imcompiling bc038c8d74 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.6.12' (#94) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 57s
Reviewed-on: #94
Reviewed-by: imcompiling <[email protected]>
2025-04-06 11:58:45 -04:00
renovate-bot 7528552280 Update ghcr.io/astral-sh/uv Docker tag to v0.6.12 2025-04-06 04:01:34 +00:00
imcompiling b71669630a Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.6.10' (#93) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Successful in 54s
Reviewed-on: #93
Reviewed-by: imcompiling <[email protected]>
2025-03-30 12:47:06 -04:00
renovate-bot 52eb92d527 Update ghcr.io/astral-sh/uv Docker tag to v0.6.10 2025-03-30 04:01:32 +00:00
imcompiling 46bce400af Merge pull request 'Update actions/checkout action to v4' (#92) from renovate/actions-checkout-4.x into main
build_latest / build (push) Successful in 47s
build_release / build (push) Successful in 19s
Reviewed-on: #92
Reviewed-by: imcompiling <[email protected]>
2025-03-23 23:38:13 -04:00
imcompiling b681d7a923 Merge pull request 'Update ghcr.io/astral-sh/uv Docker tag to v0.6.9' (#91) from renovate/ghcr.io-astral-sh-uv-0.x into main
build_latest / build (push) Has been cancelled
Reviewed-on: #91
Reviewed-by: imcompiling <[email protected]>
2025-03-23 23:37:49 -04:00
renovate-bot ec086448ea Update actions/checkout action to v4 2025-03-23 04:01:09 +00:00
renovate-bot 476b0e89ef Update ghcr.io/astral-sh/uv Docker tag to v0.6.9 2025-03-23 04:01:04 +00:00
imcompiling c1b327ca05 Change regex to strip a 10th place 0 only.
build_develop / build (push) Successful in 36s
2025-03-21 13:56:28 -04:00
imcompiling fa39949b1a Merge branch 'main' of https://gitea.cheezers.org/imcompiling/agon
build_latest / build (push) Successful in 37s
2025-03-21 10:45:04 -04:00
imcompiling f1290af45b Remove a double respond. 2025-03-21 10:44:57 -04:00
imcompiling 10954ef117 Merge branch '82-group-message-after-deletion'
build_latest / build (push) Successful in 36s
build_release / build (push) Successful in 18s
2025-03-20 11:04:26 -04:00
imcompiling af7518c1a2 Delete old group message when changing output channel.
build_develop / build (push) Successful in 29s
2025-03-20 10:55:48 -04:00
imcompiling 5be029fb57 Catch when the message has been deleted without entry deletion in my database. 2025-03-20 10:42:24 -04:00
7 changed files with 25 additions and 16 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install Docker
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install Docker
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install Docker
+1 -1
View File
@@ -1,7 +1,7 @@
FROM python:3.12.3-slim
# install uv
COPY --from=ghcr.io/astral-sh/uv:0.6.6 /uv /uvx /bin/
COPY --from=ghcr.io/astral-sh/uv:0.9.18 /uv /uvx /bin/
RUN apt-get update && apt-get -y upgrade && apt-get -y install sqlite3
+10 -3
View File
@@ -251,6 +251,10 @@ class SetCog(commands.Cog, name="Set command."):
channel (nextcord.abc.GuildChannel, optional): Channel to register.
Is a SlashOption. Limited to text channels, Defaults to None.
"""
if interaction.guild is None or interaction.channel is None:
agon_logger.warning("Set command was called with an interaction that had no guild or channel.")
return
channel_id = interaction.channel.id if not channel else channel.id
with Session(engine) as session:
@@ -262,11 +266,14 @@ class SetCog(commands.Cog, name="Set command."):
if (group := session.scalar(stmt)) is None:
await interaction.response.send_message("Group or Category was not found.", ephemeral=True)
return
old_channel_id = group.channel_id
group.channel_id = channel_id
session.commit()
# TODO(imcompiling): delete the message and call send_highscore_message to send a new one. Bug needs fixed
# first.
# 082
old_channel = interaction.guild.get_channel(old_channel_id)
if old_channel and isinstance(old_channel, nextcord.TextChannel | nextcord.Thread) and group.message_id:
await old_channel.get_partial_message(group.message_id).delete()
await interaction.send(f"Registered <#{channel_id}>.", ephemeral=True)
@group.subcommand(
+3 -5
View File
@@ -80,9 +80,7 @@ class SubmissionCog(commands.Cog):
if (
verified_score := await self.verify_score(interaction, score, is_time_record=category.is_time_record)
) is None:
# This response message will be filled out better once command is split up to
# know which type it expects...
await interaction.response.send_message("Format was incorrect.", ephemeral=True)
# Verify score handles responding. Might change when submit is split up.
return
# Create submission verification request or submit score if verification not needed.
@@ -210,9 +208,9 @@ class SubmissionCog(commands.Cog):
elif re.search("^[0-9](\\.[0-9])?$", score):
# need to add 0 in seconds and leading colon and 0
score = "0:0" + score
elif re.search("^[0]?[0-9]:[0-9]{2}(\\.[0-9])?$", score):
elif re.search("^[0][0-9]:[0-9]{2}(\\.[0-9])?$", score):
# if there is a minute 10ths place 0, remove
score = score.lstrip("0")
score = score[1:]
return score
+8 -4
View File
@@ -358,10 +358,14 @@ async def send_highscore_message(session: Session, guild: nextcord.Guild, group:
group.message_id = message.id
session.commit()
else:
# TODO(imcompiling): check what happens when message is deleted.
# https://gitea.cheezers.org/imcompiling/agon/issues/83
message: nextcord.Message = await channel.fetch_message(group.message_id)
await message.edit(content=highscore_string)
try:
message: nextcord.Message = await channel.fetch_message(group.message_id)
await message.edit(content=highscore_string)
except nextcord.NotFound:
# Message was deleted on discord's side.
message: nextcord.Message = await channel.send(highscore_string)
group.message_id = message.id
session.commit()
return