Class Core

Hierarchy

  • Core

Constructors

Properties

Methods

  • Get a channel from a string

    Parameters

    • query: string

      The possible channel: ID, Mention, Partial Name, Name

    • options: {
          force?: boolean;
          guild: Guild;
      }

      guild is the way to get the channel, force is if the bot should try to fetch it if it is not in cache

      • Optional force?: boolean
      • guild: Guild

    Returns Promise<null | AnyChannel>

    The found channel (if any)

  • Get a member from a string

    Parameters

    • query: string

      The possible member: ID, Mention, Partial Username, Username

    • options: {
          force?: boolean;
          guild: Guild;
      }

      guild is the way to get the member, force is if the bot should try to fetch it if it is not in cache

      • Optional force?: boolean
      • guild: Guild

    Returns Promise<null | Member>

    The found member (if any)

  • Get a role from a string

    Parameters

    • query: string

      The possible role: ID, Mention, Partial Name, Name

    • options: {
          force?: boolean;
          guild: Guild;
      }

      guild is the way to get the channel, force is if the bot should try to fetch it if its not in cache

      • Optional force?: boolean
      • guild: Guild

    Returns Promise<null | Role>

    The found role (if any)

  • Equivalent to '(...args) => null', used to bypass errors

    Returns null

  • Parse an argument to return a parameter value

    Parameters

    • input: string

      The argument string

    • param: BaseParam

      The Parameter type (BaseParam object or extended)

    • ctx: Context

      The Context to use

    • seeable: boolean = true

      If the argument can be get from the command execution string-arguments, or not (i.e. attachments)

    Returns Promise<{
        break: boolean;
        value: null;
    } | {
        break: boolean;
        value: string;
    } | {
        break: boolean;
        value: number;
    } | {
        break: boolean;
        value: boolean;
    } | {
        break: boolean;
        value: Member;
    } | {
        break: boolean;
        value: AnyChannel;
    } | {
        break: boolean;
        value: Role;
    } | {
        break: boolean;
        value: undefined | Attachment;
    }>

    The converted value (if possible)

Generated using TypeDoc