From 2be8507732622baa348f2191aeda135f5dd396af Mon Sep 17 00:00:00 2001 From: Grey Jones Date: Mon, 25 May 2026 23:42:37 +0100 Subject: [PATCH] Update grammar for some user-facing strings --- main.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index c3ee26f..22d94b3 100644 --- a/main.py +++ b/main.py @@ -13,13 +13,13 @@ tree = app_commands.CommandTree(client) token = os.getenv('TOKEN') -@tree.command(name="register_channel", description="sets up a checkout ledger in the current channel") +@tree.command(name="register_channel", description="Sets up a checkout ledger in the current channel") async def register_channel(interaction: discord.Interaction) -> None: db_init(interaction.channel_id) - await interaction.response.send_message("database initialised, bot is ready for use in this channel", ephemeral=True) + await interaction.response.send_message("Database initialised, commands are now ready for use in this channel", ephemeral=True) -@tree.command(name="checkout", description="marks the specified file as being 'checked out'") -@app_commands.describe(file="the file to check out") +@tree.command(name="checkout", description="Marks the specified file as being 'checked out'") +@app_commands.describe(file="The file to check out") async def checkout(interaction: discord.Interaction, file: str) -> None: if db_table_exists(interaction.channel_id): if db_file_exists(interaction.channel_id, file=file) != True: @@ -28,11 +28,11 @@ async def checkout(interaction: discord.Interaction, file: str) -> None: db_add_row(channel_id=interaction.channel_id,file=file,message_id=message.id,user=interaction.user) else: message_id = db_get_message_id_by_file(channel_id=interaction.channel_id, file=file) - await interaction.response.send_message(f"the requested file has already been checked out by another user [here](https://discordapp.com/channels/{interaction.guild_id}/{interaction.channel_id}/{message_id})...", ephemeral=True) + await interaction.response.send_message(f"The requested file has already been checked out by another user [here](https://discordapp.com/channels/{interaction.guild_id}/{interaction.channel_id}/{message_id})...", ephemeral=True) else: - await interaction.response.send_message("the current channel does not have a ledger, either run `/register_channel` or move to a different channel and try again...", ephemeral=True) + await interaction.response.send_message("The current channel does not have a ledger, either run `/register_channel` or move to a different channel and try again...", ephemeral=True) -@tree.command(name="checkin", description="allows the user to select a checked out file to check back in") +@tree.command(name="checkin", description="Allows the user to select a file to check back in") async def checkin(interaction: discord.Interaction) -> None: if db_table_exists(interaction.channel_id): if db_user_exists(interaction.channel_id, interaction.user): @@ -42,9 +42,9 @@ async def checkin(interaction: discord.Interaction) -> None: else: await interaction.response.send_modal(CheckinModal(channel_id=interaction.channel_id,user=interaction.user)) else: - await interaction.response.send_message("you haven't checked out any files in this channel yet!", ephemeral=True) + await interaction.response.send_message("You haven't checked out any files in this channel yet!", ephemeral=True) else: - await interaction.response.send_message("the current channel does not have a ledger, either run `/register_channel` or move to a different channel and try again...", ephemeral=True) + await interaction.response.send_message("The current channel does not have a ledger, either run `/register_channel` or move to a different channel and try again...", ephemeral=True) @client.event async def on_ready(): @@ -178,7 +178,7 @@ class CheckinModal(discord.ui.Modal, title='Check a file back in!'): message = await channel.fetch_message(db_get_message_id_by_file(channel_id=self.channel_id,file=self.select.component.values[0])) await message.delete() db_delete_row_by_file(channel_id=self.channel_id,file=self.select.component.values[0]) - return await interaction.response.send_message(f"Successfully checked in file '{self.select.component.values[0]}'!", ephemeral=True) + return await interaction.response.send_message(f"Successfully checked in the file '{self.select.component.values[0]}'!", ephemeral=True) class CheckinConfirmationModal(discord.ui.Modal, title='Please confirm this is correct...'): text = discord.ui.TextDisplay("hello world")