Skip to content

Commit

Permalink
fix: Hide RPS game alert to public
Browse files Browse the repository at this point in the history
  • Loading branch information
iach526526 authored and winstonsung committed Feb 3, 2025
1 parent 3dcc826 commit a26545a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cog/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def rock_paper_scissors(
self, interaction, choice: discord.Option(str, choices=["✊", "🤚", "✌️"])
):
if interaction.channel.id != get_channels()["channel"]["commandChannel"]:
await interaction.response.send_message("這裡不是指令區喔")
await interaction.response.send_message("這裡不是指令區喔", ephemeral=True)
return
user_id = interaction.user.id
user_display_name = interaction.user
Expand All @@ -51,11 +51,15 @@ async def rock_paper_scissors(

point = read(user_id, "point", cursor)
if point < 5:
await interaction.response.send_message("你的電電點不足以玩這個遊戲")
await interaction.response.send_message(
"你的電電點不足以玩這個遊戲", ephemeral=True
)
end(connection, cursor)
return
if choice not in ["✊", "🤚", "✌️"]:
await interaction.response.send_message("請輸入正確的選擇")
await interaction.response.send_message(
"請輸入正確的選擇", ephemeral=True
)
end(connection, cursor)
return

Expand Down

0 comments on commit a26545a

Please sign in to comment.