Compare commits

...
3 Commits
Author SHA1 Message Date
imcompiling 6a26440c4d Remove view for submit button.
build_develop / build (push) Successful in 38s
build_release / build (push) Successful in 22s
2025-02-26 20:26:42 -05:00
imcompiling 2735d6877f Remove messages intent. 2025-02-26 20:18:21 -05:00
imcompiling 117f5655d7 Merge pull request 'Update docker/login-action action to v3' (#75) from renovate/docker-login-action-3.x into main
build_develop / build (push) Successful in 20s
Reviewed-on: #75
Reviewed-by: imcompiling <[email protected]>
2025-02-25 09:28:16 -05:00
3 changed files with 3 additions and 12 deletions
+1 -3
View File
@@ -5,7 +5,6 @@ from nextcord.ext import commands
from sqlalchemy import exc, select
from sqlalchemy.orm import Session
from cogs.submission.submission_views import SubmissionCreateButton
from database_setup.sql_data_classes import Category, CategoryGroup, engine
from utilities.utils import MAX_LINE_LENGTH, autofill_groups, send_highscore_message
@@ -134,8 +133,7 @@ class CreateCog(commands.Cog, name="Create Cog"):
try:
session.add(new_group)
session.commit()
message: nextcord.Message = await send_highscore_message(session, interaction.guild, new_group)
await message.edit(view=SubmissionCreateButton(self._bot))
await send_highscore_message(session, interaction.guild, new_group)
await interaction.response.send_message(f'"{group_name}" has been created!', ephemeral=True)
except exc.IntegrityError:
# Category Group already exists in guild
+2 -6
View File
@@ -8,7 +8,6 @@ from sqlalchemy import select
from sqlalchemy.orm import Session
# pylint: disable=import-error
from cogs.submission.submission_views import SubmissionCreateButton
from database_setup.sql_data_classes import CategoryGroup, engine
from utilities.utils import autofill_groups, send_highscore_message
@@ -50,9 +49,7 @@ class RefreshCog(commands.Cog, name="Refresh Cog"):
)
group = session.scalar(stmt)
message: nextcord.Message = await send_highscore_message(session, interaction.guild, group)
await message.edit(view=SubmissionCreateButton(self._bot))
await send_highscore_message(session, interaction.guild, group)
await interaction.response.send_message(f"Updated group {group.GroupName}!", ephemeral=True)
@refresh.subcommand()
@@ -77,8 +74,7 @@ class RefreshCog(commands.Cog, name="Refresh Cog"):
await interaction.response.defer(ephemeral=True)
for group in session.scalars(stmt):
message: nextcord.Message = await send_highscore_message(session, interaction.guild, group)
await message.edit(view=SubmissionCreateButton(self._bot))
await send_highscore_message(session, interaction.guild, group)
await interaction.send(f"Posted all groups in {interaction.guild.name}'s highscores.", ephemeral=True)
-3
View File
@@ -33,9 +33,6 @@ def main() -> None:
# These need to be enabled in the developer portal as well
intents = nextcord.Intents.default()
# Required in order to read messages (eg. prefix commands)
intents.message_content = True
bot = commands.Bot(
commands.when_mentioned_or(config.BOT_PREFIX),
intents=intents,