refine description strings
This commit is contained in:
6
main.py
6
main.py
@@ -1,5 +1,4 @@
|
||||
import asyncio
|
||||
import functools
|
||||
from sys import argv
|
||||
|
||||
import discord
|
||||
@@ -20,8 +19,7 @@ client = commands.Bot(command_prefix="/", intents=intents)
|
||||
|
||||
async def reply_message_async(interaction: discord.Interaction, owner: str, repo: str):
|
||||
try:
|
||||
loop = asyncio.get_running_loop()
|
||||
result = await loop.run_in_executor(None, functools.partial(PICable.PICable, owner, repo, github_token))
|
||||
result = await asyncio.to_thread(PICable.PICable, owner, repo, github_token)
|
||||
await interaction.followup.send(result)
|
||||
except Exception as e:
|
||||
print(f"Error processing PICable check: {e}")
|
||||
@@ -40,7 +38,7 @@ async def on_ready():
|
||||
print(f"Failed to sync commands: {e}")
|
||||
|
||||
|
||||
@client.tree.command(name="picable", description="Check if a Github repository is eligible for PIC")
|
||||
@client.tree.command(name="picable", description="Check if a Github repository is eligible for PIC.")
|
||||
@discord.app_commands.describe(owner="The owner of the repository", repository="The name of the repository")
|
||||
async def picable(interaction: discord.Interaction, owner: str, repository: str):
|
||||
await interaction.response.defer(ephemeral=False, thinking=True)
|
||||
|
||||
Reference in New Issue
Block a user