Skip to content

Commit 8ed9c88

Browse files
committed
Fix help command for reply and note
1 parent 1948b86 commit 8ed9c88

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/thread.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
import os
55
import string
66
import typing
7+
from types import SimpleNamespace as param
78
from datetime import datetime, timedelta
89

910
import discord
10-
from discord.ext.commands import UserInputError, CommandError
11+
from discord.ext.commands import MissingRequiredArgument
1112

1213
from core.models import Bot, ThreadManagerABC, ThreadABC
1314
from core.utils import is_image_url, days, match_user_id
@@ -348,7 +349,7 @@ async def delete_message(self, message_id):
348349

349350
async def note(self, message):
350351
if not message.content and not message.attachments:
351-
raise UserInputError
352+
raise MissingRequiredArgument(param(name='msg'))
352353

353354
await asyncio.gather(
354355
self.bot.api.append_log(message,
@@ -359,7 +360,7 @@ async def note(self, message):
359360

360361
async def reply(self, message, anonymous=False):
361362
if not message.content and not message.attachments:
362-
raise UserInputError
363+
raise MissingRequiredArgument(param(name='msg'))
363364
if all(not g.get_member(self.id) for g in self.bot.guilds):
364365
return await message.channel.send(
365366
embed=discord.Embed(

0 commit comments

Comments
 (0)