MKE0108 commited on
Commit
a0a55ff
·
1 Parent(s): f35e69a
Files changed (1) hide show
  1. bot_main.py +3 -1
bot_main.py CHANGED
@@ -1,5 +1,6 @@
1
  import discord
2
  from discord.ext import commands
 
3
  import os
4
  if(os.getenv('BOT_TOKENS') == None):
5
  from keys import init
@@ -51,7 +52,8 @@ def get_pick_embed(player):
51
 
52
  return embed
53
 
54
- @bot.hybrid_command(description="抽路線指令",channel_name="語音聊天室名稱",other_user="人名1 人名2 ...")
 
55
  async def pick(ctx, channel_name="",other_user=""):
56
  # 搜尋指定名稱的語音頻道
57
  voice_channel = discord.utils.get(ctx.guild.voice_channels, name=channel_name)
 
1
  import discord
2
  from discord.ext import commands
3
+ from discord import app_commands
4
  import os
5
  if(os.getenv('BOT_TOKENS') == None):
6
  from keys import init
 
52
 
53
  return embed
54
 
55
+ @bot.hybrid_command(name="抽路線指令",description="會從<<指定語音頻道>>和<<指定其他玩家名稱>>中選路線")
56
+ @app_commands.describe(channel="語音頻道名稱",other_user="其他玩家名稱")
57
  async def pick(ctx, channel_name="",other_user=""):
58
  # 搜尋指定名稱的語音頻道
59
  voice_channel = discord.utils.get(ctx.guild.voice_channels, name=channel_name)