Skip to content

Commit 2c798f3

Browse files
committed
ロールが表示されない問題を修正
1 parent 4f19c30 commit 2c798f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cogs/commands/role-panel.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from discord.ext import commands
99
import asyncpg # 追加
1010
from dotenv import load_dotenv # 追加
11+
from discord.app_commands import Transform, RoleTransformer # 追加
1112

1213
logger = logging.getLogger(__name__)
1314

@@ -151,7 +152,7 @@ async def create_panel(
151152
@role_panel_group.command(name="add", description="ロールパネルにロールを追加します")
152153
@app_commands.describe(
153154
panel_id="ロールパネルのメッセージID",
154-
role="追加するロール",
155+
role="追加するロール(ロールが表示されない場合は、ロールIDを入力してください)",
155156
emoji="関連付けるリアクション絵文字",
156157
description="ロールの説明(任意)"
157158
)
@@ -160,7 +161,7 @@ async def add_role(
160161
self,
161162
interaction: discord.Interaction,
162163
panel_id: str,
163-
role: discord.Role,
164+
role: Transform[discord.Role, RoleTransformer], # 修正
164165
emoji: str,
165166
description: str = ""
166167
):

0 commit comments

Comments
 (0)