Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2c1dd9cd0 | ||
|
|
8016b034ac | ||
|
|
5f4fcc28ae | ||
|
|
a99a76a3e0 | ||
|
|
b7028c112d | ||
|
|
2229a383c5 | ||
|
|
ea1f1a5b3d | ||
|
|
db2657a5b3 | ||
|
|
ff2c233381 | ||
|
|
ab9176b10d | ||
|
|
7c77603711 | ||
|
|
5cc41b8e8c | ||
|
|
d470ca3a8f | ||
|
|
f2d55f435d | ||
|
|
ea63c5ea88 | ||
|
|
b01616f744 | ||
|
|
811ec5c7ee | ||
|
|
1950bcdc16 | ||
|
|
972ecef2be | ||
|
|
540efc8819 | ||
|
|
7d02608a14 | ||
|
|
7861e498c5 | ||
|
|
dd28de3cac | ||
|
|
cf872c071b | ||
|
|
6c6b5cac25 | ||
|
|
50ce8fbfa3 | ||
|
|
d0ef8e723f | ||
|
|
c434154d84 | ||
|
|
bc038c8d74 | ||
|
|
7528552280 | ||
|
|
b71669630a | ||
|
|
52eb92d527 | ||
|
|
46bce400af | ||
|
|
b681d7a923 | ||
|
|
ec086448ea | ||
|
|
476b0e89ef | ||
|
|
c1b327ca05 | ||
|
|
fa39949b1a | ||
|
|
f1290af45b | ||
|
|
10954ef117 | ||
|
|
0540f7a9eb | ||
|
|
a4aab09360 |
@@ -13,7 +13,7 @@ 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
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ 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
|
||||||
|
|||||||
+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.6.6 /uv /uvx /bin/
|
COPY --from=ghcr.io/astral-sh/uv:0.11.23 /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
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class CreateCog(commands.Cog, name="Create Cog"):
|
|||||||
min_value=1,
|
min_value=1,
|
||||||
max_value=30,
|
max_value=30,
|
||||||
),
|
),
|
||||||
channel: nextcord.TextChannel | None = nextcord.SlashOption(
|
channel: nextcord.TextChannel | nextcord.Thread | None = nextcord.SlashOption(
|
||||||
description="Channel to post Group in. If left empty, defaults to current channel.",
|
description="Channel to post Group in. If left empty, defaults to current channel.",
|
||||||
required=False,
|
required=False,
|
||||||
default=None,
|
default=None,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class DeleteCog(commands.Cog, name="Delete Cog"):
|
|||||||
async def channel_messages(
|
async def channel_messages(
|
||||||
self,
|
self,
|
||||||
interaction: nextcord.Interaction,
|
interaction: nextcord.Interaction,
|
||||||
channel: nextcord.TextChannel | None = nextcord.SlashOption(
|
channel: nextcord.TextChannel | nextcord.Thread | None = nextcord.SlashOption(
|
||||||
description="Channel to clear of messages.",
|
description="Channel to clear of messages.",
|
||||||
required=False,
|
required=False,
|
||||||
default=None,
|
default=None,
|
||||||
@@ -54,7 +54,7 @@ class DeleteCog(commands.Cog, name="Delete Cog"):
|
|||||||
Is a SlashOption. Limited to text channels. Defaults to None.
|
Is a SlashOption. Limited to text channels. Defaults to None.
|
||||||
"""
|
"""
|
||||||
if not channel:
|
if not channel:
|
||||||
if isinstance(interaction.channel, nextcord.TextChannel):
|
if isinstance(interaction.channel, nextcord.TextChannel | nextcord.Thread):
|
||||||
channel = interaction.channel
|
channel = interaction.channel
|
||||||
else:
|
else:
|
||||||
# This should never happen.
|
# This should never happen.
|
||||||
|
|||||||
@@ -80,9 +80,7 @@ class SubmissionCog(commands.Cog):
|
|||||||
if (
|
if (
|
||||||
verified_score := await self.verify_score(interaction, score, is_time_record=category.is_time_record)
|
verified_score := await self.verify_score(interaction, score, is_time_record=category.is_time_record)
|
||||||
) is None:
|
) is None:
|
||||||
# This response message will be filled out better once command is split up to
|
# Verify score handles responding. Might change when submit is split up.
|
||||||
# know which type it expects...
|
|
||||||
await interaction.response.send_message("Format was incorrect.", ephemeral=True)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# Create submission verification request or submit score if verification not needed.
|
# Create submission verification request or submit score if verification not needed.
|
||||||
@@ -103,7 +101,7 @@ class SubmissionCog(commands.Cog):
|
|||||||
await interaction.response.send_message(error_response, ephemeral=True)
|
await interaction.response.send_message(error_response, ephemeral=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if not isinstance(channel, nextcord.TextChannel):
|
if not isinstance(channel, nextcord.TextChannel | nextcord.Thread):
|
||||||
await interaction.response.send_message("An error happened with submission.")
|
await interaction.response.send_message("An error happened with submission.")
|
||||||
agon_logger.error(
|
agon_logger.error(
|
||||||
"Channel id %s in guild %s is does not correspond to a TextChannel.", channel.id, channel.guild.id
|
"Channel id %s in guild %s is does not correspond to a TextChannel.", channel.id, channel.guild.id
|
||||||
@@ -210,9 +208,9 @@ class SubmissionCog(commands.Cog):
|
|||||||
elif re.search("^[0-9](\\.[0-9])?$", score):
|
elif re.search("^[0-9](\\.[0-9])?$", score):
|
||||||
# need to add 0 in seconds and leading colon and 0
|
# need to add 0 in seconds and leading colon and 0
|
||||||
score = "0:0" + score
|
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
|
# if there is a minute 10ths place 0, remove
|
||||||
score = score.lstrip("0")
|
score = score[1:]
|
||||||
|
|
||||||
return score
|
return score
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class DeleteConfirmView(nextcord.ui.Modal):
|
|||||||
session.delete(group)
|
session.delete(group)
|
||||||
# delete the message related to group
|
# delete the message related to group
|
||||||
channel = interaction.guild.get_channel(group.channel_id)
|
channel = interaction.guild.get_channel(group.channel_id)
|
||||||
if not isinstance(channel, nextcord.TextChannel):
|
if not isinstance(channel, nextcord.TextChannel | nextcord.Thread):
|
||||||
return
|
return
|
||||||
message: nextcord.Message = await channel.fetch_message(group.message_id)
|
message: nextcord.Message = await channel.fetch_message(group.message_id)
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
|||||||
+1
-1
@@ -346,7 +346,7 @@ async def send_highscore_message(session: Session, guild: nextcord.Guild, group:
|
|||||||
agon_logger.error("Channel id %s in guild %s does not exist.", group.channel_id, guild.id)
|
agon_logger.error("Channel id %s in guild %s does not exist.", group.channel_id, guild.id)
|
||||||
return
|
return
|
||||||
|
|
||||||
if not isinstance(channel, nextcord.TextChannel) or not isinstance(channel, nextcord.Thread):
|
if not isinstance(channel, nextcord.TextChannel | nextcord.Thread):
|
||||||
agon_logger.error(
|
agon_logger.error(
|
||||||
"Channel id %s in guild %s is does not correspond to a TextChannel or Thread.", channel.id, channel.guild.id
|
"Channel id %s in guild %s is does not correspond to a TextChannel or Thread.", channel.id, channel.guild.id
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user