code: async def check_permission(bot: NoneBot, ctx: Context_T,
                             permission_required: int) -> bool:
      
      min_ctx_kwargs = {}
      for field in _min_context_fields:
          if field in ctx:
              min_ctx_kwargs[field] = ctx[field]
          else:
              min_ctx_kwargs[field] = None
      min_ctx = _MinContext(**min_ctx_kwargs)
      return await _check(bot, min_ctx, permission_required)
docs: Check if the context has the permission required.
  
      :param bot: NoneBot instance
      :param ctx: message context
      :param permission_required: permission required
      :return: the context has the permission