discord.js-search

    1.0.1 • Public • Published

    discord.js-search

    Find Discord assets such as users or channels in an easier way—quick and easy setup.

    Install

    npm:

    npm install discord.js-search

    yarn:

    yarn add discord.js-search

    Requirements:

    Node.jsv14 or latest.

    Discord.jsv12.3.1 or latest.

    Example

    Synchronous:

    const search = require("discord.js-search");
    
    search.searchMember(message, 'ray#1337').then(x => {
      console.log(x); // Return: https://discord.js.org/#/docs/main/stable/class/GuildMember
    });

    Asynchronous:

    const search = require("discord.js-search");
    
    let findMem = await search.searchMember(message, 'ray#1337');
    return message.channel.send(findMem.user.tag); // Return: https://discord.js.org/#/docs/main/stable/class/GuildMember

    Reference

    • query can be string (name, tag) or number (ID)
    • fetchUnused - Force API to fetch all members. (optional)
    • production - Skip package validation such as Discord.js for pre-production purposes. (optional)
    • searchEmoji(message, query:String|Number, production:Boolean = false)

    • searchRole(message, query:String|Number, production:Boolean = false)

    • searchChannel(message, query:String|Number, production:Boolean = false)

    • searchMember(message, query:String|Number, fetchUnused:Boolean = false, production:Boolean = false)

    Changelog

    See CHANGELOG.md.

    Links

    Disclaimer

    This project is not affiliated/associated/partnered with Discord or even Discord.js itself.
    If you have a problem with the package, create issue template instead.

    License

    © Copyright 2020-present, Blob Project
    Apache License, version 2.0

      This feature is exclusive to Teams

      Illustration of wombats

      The package file explorer is only available for Teams at the moment.

      We may support exploring this package in the future. Check back soon.

      Install

      npm i discord.js-search

      DownloadsWeekly Downloads

      40

      Version

      1.0.1

      License

      Apache-2.0

      Unpacked Size

      13.6 kB

      Total Files

      8

      Last publish

      Collaborators

      • ray_1337