2025.2 Releases May 2025!
Check it Out!
Bit
Bit Source CodeBug & Suggestion Tracker
2025.2
  • Bit
  • Docs
  • Bit Plugins
  • Bit Changelogs
  • Bit Hosted
2025.2
  • Welcome
  • Updating
  • Commands
  • FAQ
  • Install Plugins
  • Dev
    • Create Plugins
      • Commands
      • Events
      • Plugin Requirements
      • Functions
        • bit/plugins
          • .is_active(id, version)
          • .find(id)
          • .list()
          • .count()
        • bit/core
          • .log(type, "Plugin Name", force_console, "Log")
          • .find_emoji(unicode_emoji)
          • .add_intent(IntentGatewayBits)
          • .install_module(npm_package)
      • Run function on bot startup
      • Global Exports
      • Definable Intents
      • Definable Node Modules
      • plugin.json
      • update.json
      • Updating to Bit 2025.2
      • Updating to Bit 2025.1
      • Updating to Bit 2024.2
      • Updating to Bit 2024.1
  • Dev español
    • Bienvenido
    • Crear complementos
      • Comandos
      • Eventos
      • Requisitos del complemento
      • Funciones
        • bit/plugins
        • bit/core
          • .logs
      • Ejecutar función al iniciar el bot
Powered by GitBook
LogoLogo

Copyright 2018-2025 Lockyz Media

On this page

Was this helpful?

Edit on GitHub
  1. Dev
  2. Create Plugins
  3. Functions
  4. bit/plugins

.find(id)

plugins.find(id) is used to find a specific plugin and it's information.

If the plugin cannot be found within the plugins database, it'll return a status code of 404.

This function will return an array of the plugins info and/or the status of the search.

plugins.find(id)

Example use

const plugins = require('bit/plugins');

const pluginInfo = plugins.find('bit-core')

if(!pluginInfo.status.code === 404) {
    console.log(`Plugin with an id of 'bit-core' cannot be found`)
} else {
    console.log(`Plugin with an id of 'bit-core' was found!`)
    console.log(`Plugin Name: ${pluginInfo.plugin.name}`)
    console.log(`Plugin ID: ${pluginInfo.plugin.id}`)
    console.log(`Plugin Version: ${pluginInfo.plugin.version}`)
    console.log(`Plugin Has Index?: ${pluginInfo.plugin.has_index}`)
    console.log(`Plugin Disabled: ${pluginInfo.plugin.disabled}`)
    console.log(`Plugin Requirements: ${pluginInfo.plugin.requirements}`)
}

// Output if bit-core is found
/*
Plugin with an id of 'bit-core' was found!
Plugin Name: Bit: COre
Plugin ID: bit-core
Plugin Version: 2025.2.0
Plugin Has Index?: true
Plugin Disabled: false
Plugin Requirements: {
    "bit": {
        "version": "2025.2.0",
        "level": 0
    }
}
*/

// Output if bit-core is not found
/*
Plugin with an id of 'bit-core' cannot be found
*/

Last updated 29 days ago

Was this helpful?