Skip to content

Commit

Permalink
fix: provide a discord.Member object instead of string to slash comma…
Browse files Browse the repository at this point in the history
…nds (#273)
  • Loading branch information
ReenigneArcher committed Apr 22, 2024
1 parent 389d41a commit 76a903c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/discord_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ async def on_ready():

bot.add_view(DonateCommandView()) # register view for persistent listening

# try to force sync commands
# calling an outdated command seems to force a sync
await bot.sync_commands(
commands=bot.commands,
force=True,
)

try:
os.environ['DAILY_TASKS']
except KeyError:
Expand Down Expand Up @@ -181,7 +188,7 @@ async def channel(ctx: discord.ApplicationContext,
)
async def donate_command(ctx: discord.ApplicationContext,
user: Option(
input_type=discord.Member,
discord.Member,
description=user_mention_desc,
required=False)
):
Expand Down Expand Up @@ -210,7 +217,7 @@ async def donate_command(ctx: discord.ApplicationContext,
)
async def random_command(ctx: discord.ApplicationContext,
user: Option(
input_type=discord.Member,
discord.Member,
description=user_mention_desc,
required=False)
):
Expand Down Expand Up @@ -258,7 +265,7 @@ async def random_command(ctx: discord.ApplicationContext,
)
async def docs_command(ctx: discord.ApplicationContext,
user: Option(
input_type=discord.Member,
discord.Member,
description=user_mention_desc,
required=False)
):
Expand Down Expand Up @@ -300,7 +307,7 @@ async def docs_command(ctx: discord.ApplicationContext,
)
async def refund_command(ctx: discord.ApplicationContext,
user: Option(
input_type=discord.Member,
discord.Member,
description=user_mention_desc,
required=False)
):
Expand Down

0 comments on commit 76a903c

Please sign in to comment.