code: async def ctcp_reply(self, target, query, response):
          
          if self.is_channel(target) and not self.in_channel(target):
              raise client.NotInChannel(target)
  
          await self.notice(target, construct_ctcp(query, response))
docs: Send a CTCP reply to a target.