Skip to content

Commit 645adf1

Browse files
committed
Start updating internal api endpoints to new ones
1 parent 0151cbb commit 645adf1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bot.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
'''
2424

25-
__version__ = '1.5.2'
25+
__version__ = '1.5.3'
2626

2727
from contextlib import redirect_stdout
2828
from urllib.parse import urlparse
@@ -206,6 +206,8 @@ async def on_command_error(self, ctx, error):
206206
em.title = f'`{prefix}{ctx.command.signature}`'
207207
em.description = ctx.command.help
208208
await ctx.send(embed=em)
209+
else:
210+
raise error
209211

210212
def overwrites(self, ctx, modrole=None):
211213
'''Permision overwrites for the guild.'''
@@ -280,7 +282,7 @@ async def data_loop(self):
280282
"version": __version__
281283
}
282284

283-
await self.session.post('https://api.kybr.tk/modmail', json=data)
285+
await self.session.post('https://api.modmail.tk/metadata', json=data)
284286

285287
await asyncio.sleep(3600)
286288

@@ -341,7 +343,7 @@ async def about(self, ctx):
341343
'easily communicate with server leadership in an organised manner.'
342344

343345
try:
344-
async with self.session.get('https://api.kybr.tk/modmail') as resp:
346+
async with self.session.get('https://api.modmail.tk/metadata') as resp:
345347
meta = await resp.json()
346348
except:
347349
meta = None
@@ -916,6 +918,9 @@ async def contact(self, ctx, *, user: discord.Member=None):
916918
reopen = True
917919
if not user:
918920
return await ctx.send('This user does not share any servers with the bot and is thus unreachable.')
921+
922+
if not user:
923+
raise commands.UserInputError('user must be provided')
919924

920925
categ = discord.utils.get(ctx.guild.categories, id=ctx.channel.category_id)
921926
channel = await self.find_or_create_thread(user, creator=ctx.author, reopen=reopen)

0 commit comments

Comments
 (0)