回答編集履歴
1
self
answer
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
コマンドでのエラーを拾う`on_command_error` を使います。
|
2
2
|
```python
|
3
3
|
@bot.event
|
4
|
-
async def on_command_error(
|
4
|
+
async def on_command_error(ctx, error):
|
5
5
|
if isinstance(error, commands.errors.MissingPermissions): #エラーの内容を判別
|
6
6
|
await ctx.send("権限がありません")
|
7
7
|
else:
|