@@ -395,7 +395,7 @@ async def _restart(self, interaction: discord.Interaction,
395395 _ ("Timeout while the mission {what}.\n "
396396 "Please check with {command}, if the mission is running." ).format (
397397 what = _ (actions .get (what )),
398- command = (await utils .get_command (self .bot , group = ' mission' , name = ' info' )).mention
398+ command = (await utils .get_command (self .bot , group = self . mission . name , name = self . info . name )).mention
399399 ), ephemeral = ephemeral )
400400
401401 async def _load (self , interaction : discord .Interaction , server : Server , mission : int | str | None = None ,
@@ -488,7 +488,7 @@ async def _load(self, interaction: discord.Interaction, server: Server, mission:
488488 message += _ ('\n This mission is NOT in the mission list and will not auto-load on server '
489489 'or mission restarts.\n '
490490 'If you want it to auto-load, use {}' ).format (
491- (await utils .get_command (self .bot , group = ' mission' , name = ' add' )).mention )
491+ (await utils .get_command (self .bot , group = self . mission . name , name = self . add . name )).mention )
492492 await msg .edit (content = message )
493493 await self .bot .audit (f"loaded mission { utils .escape_string (name )} " , server = server ,
494494 user = interaction .user )
@@ -1336,21 +1336,26 @@ async def screenshot(self, interaction: discord.Interaction,
13361336
13371337 watch = Group (name = "watch" , description = "Commands to manage the watchlist" )
13381338
1339- @watch .command (description = _ ('Puts a player onto the watchlist' ))
1339+ @watch .command (name = 'add' , description = _ ('Puts a player onto the watchlist' ))
13401340 @app_commands .guild_only ()
13411341 @utils .app_has_role ('DCS Admin' )
1342- async def add (self , interaction : discord .Interaction ,
1343- user : app_commands .Transform [discord .Member | str , utils .UserTransformer (
1344- sel_type = PlayerType .PLAYER , watchlist = False )], reason : str ):
1342+ async def _add (self , interaction : discord .Interaction ,
1343+ user : app_commands .Transform [discord .Member | str , utils .UserTransformer (
1344+ sel_type = PlayerType .PLAYER , watchlist = False )], reason : str ):
13451345 if isinstance (user , discord .Member ):
13461346 ucid = await self .bot .get_ucid_by_member (user )
13471347 if not ucid :
13481348 # noinspection PyUnresolvedReferences
13491349 await interaction .response .send_message (_ ("Member {} is not linked!" ).format (user .display_name ),
13501350 ephemeral = True )
13511351 return
1352- else :
1352+ elif utils . is_ucid ( user ) :
13531353 ucid = user
1354+ else :
1355+ # noinspection PyUnresolvedReferences
1356+ await interaction .response .send_message (_ ("User not found." ), ephemeral = True )
1357+ return
1358+
13541359 try :
13551360 async with self .apool .connection () as conn :
13561361 async with conn .transaction ():
@@ -1624,7 +1629,7 @@ async def _info(self, interaction: discord.Interaction, member: discord.Member |
16241629 # noinspection PyUnresolvedReferences
16251630 await interaction .response .send_message (
16261631 _ ("This user does not exist. Try {} to find them in the historic data." ).format (
1627- (await utils .get_command (self .bot , name = ' find' )).mention
1632+ (await utils .get_command (self .bot , name = self . find . name )).mention
16281633 ), ephemeral = True )
16291634 return
16301635 ephemeral = utils .get_ephemeral (interaction )
0 commit comments