File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 4
4
import os
5
5
import string
6
6
import typing
7
+ from types import SimpleNamespace as param
7
8
from datetime import datetime , timedelta
8
9
9
10
import discord
10
- from discord .ext .commands import UserInputError , CommandError
11
+ from discord .ext .commands import MissingRequiredArgument
11
12
12
13
from core .models import Bot , ThreadManagerABC , ThreadABC
13
14
from core .utils import is_image_url , days , match_user_id
@@ -348,7 +349,7 @@ async def delete_message(self, message_id):
348
349
349
350
async def note (self , message ):
350
351
if not message .content and not message .attachments :
351
- raise UserInputError
352
+ raise MissingRequiredArgument ( param ( name = 'msg' ))
352
353
353
354
await asyncio .gather (
354
355
self .bot .api .append_log (message ,
@@ -359,7 +360,7 @@ async def note(self, message):
359
360
360
361
async def reply (self , message , anonymous = False ):
361
362
if not message .content and not message .attachments :
362
- raise UserInputError
363
+ raise MissingRequiredArgument ( param ( name = 'msg' ))
363
364
if all (not g .get_member (self .id ) for g in self .bot .guilds ):
364
365
return await message .channel .send (
365
366
embed = discord .Embed (
You can’t perform that action at this time.
0 commit comments