Hierarchy

  • API

Constructors

Properties

Accessors

Methods

Constructors

Properties

#client: Leveling

Accessors

  • get servers(): {
        announce: {
            setChannel: ((guildId, channelId) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            setMessage: ((guildId, type, options) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            toggle: ((guildId, type) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        cooldown: ((guildId, seconds) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        delete: ((guildId) => Promise<{
            data: {
                data: null | CachedOptions<Settings>;
                users: CachedOptions<Users>[];
                weekly: CachedOptions<Weekly>[];
            };
            message: string;
            status: boolean;
        }>);
        fetchAll: ((guildIds?) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Settings> & {
                _id: ObjectId;
            })[];
            status: true;
        }>);
        get: ((guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Settings & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        ignore: {
            channels: ((guildId, channels) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            roles: ((guildId, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            users: ((guildId, users) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        import: ((guildId, targetGuildId, type?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        leaderboard: {
            formatted: (<D>(guildId, options?, forceStatic?, board?) => Promise<{
                message: string;
                status: false;
            } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>);
            get: (<D>(guildId, options?, board?) => Promise<{
                message: string;
                status: false;
            } | LeaderboardFormattedResponse<LeaderboardUser[]>>);
            setBackground: ((guildId, options) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        levels: {
            add: ((guildId, level, options?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            addRoles: ((guildId, level, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            remove: ((guildId, level) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            removeRoles: ((guildId, level, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            setMessage: ((guildId, options, level) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        multipliers: {
            add: ((guildId, multiplier, options?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            channels: ((guildId, multiplier, channels) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            remove: ((guildId, multiplier) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            roles: ((guildId, multiplier, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        setXP: ((guildId, options) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        toggle: ((guildId, type) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        weekly: {
            setChannel: ((guildId, channelId) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            setRoles: ((guildId, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
    }
  • Returns {
        announce: {
            setChannel: ((guildId, channelId) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            setMessage: ((guildId, type, options) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            toggle: ((guildId, type) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        cooldown: ((guildId, seconds) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        delete: ((guildId) => Promise<{
            data: {
                data: null | CachedOptions<Settings>;
                users: CachedOptions<Users>[];
                weekly: CachedOptions<Weekly>[];
            };
            message: string;
            status: boolean;
        }>);
        fetchAll: ((guildIds?) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Settings> & {
                _id: ObjectId;
            })[];
            status: true;
        }>);
        get: ((guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Settings & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        ignore: {
            channels: ((guildId, channels) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            roles: ((guildId, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            users: ((guildId, users) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        import: ((guildId, targetGuildId, type?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        leaderboard: {
            formatted: (<D>(guildId, options?, forceStatic?, board?) => Promise<{
                message: string;
                status: false;
            } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>);
            get: (<D>(guildId, options?, board?) => Promise<{
                message: string;
                status: false;
            } | LeaderboardFormattedResponse<LeaderboardUser[]>>);
            setBackground: ((guildId, options) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        levels: {
            add: ((guildId, level, options?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            addRoles: ((guildId, level, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            remove: ((guildId, level) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            removeRoles: ((guildId, level, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            setMessage: ((guildId, options, level) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        multipliers: {
            add: ((guildId, multiplier, options?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            channels: ((guildId, multiplier, channels) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            remove: ((guildId, multiplier) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            roles: ((guildId, multiplier, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        setXP: ((guildId, options) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        toggle: ((guildId, type) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        weekly: {
            setChannel: ((guildId, channelId) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            setRoles: ((guildId, roles) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
    }

    • announce: {
          setChannel: ((guildId, channelId) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          setMessage: ((guildId, type, options) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          toggle: ((guildId, type) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • setChannel: ((guildId, channelId) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, channelId): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset the announcement channel for level ups.

            Parameters

            • guildId: string
            • channelId: string

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • setMessage: ((guildId, type, options) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, type, options): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset the content/embeds for certain types on a certain server.

            Parameters

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • toggle: ((guildId, type) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, type): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Toggle on/off certain features for a certain server.

            Parameters

            • guildId: string
            • type: "channel" | "dm" | "ping" | "onlyRegisteredLevels"

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

    • cooldown: ((guildId, seconds) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (guildId, seconds): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Set the cooldown for XP earned on a certain server. NOTE: This is in seconds!

          Parameters

          • guildId: string
          • seconds: number

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • delete: ((guildId) => Promise<{
          data: {
              data: null | CachedOptions<Settings>;
              users: CachedOptions<Users>[];
              weekly: CachedOptions<Weekly>[];
          };
          message: string;
          status: boolean;
      }>)
        • (guildId): Promise<{
              data: {
                  data: null | CachedOptions<Settings>;
                  users: CachedOptions<Users>[];
                  weekly: CachedOptions<Weekly>[];
              };
              message: string;
              status: boolean;
          }>
        • Delete all data belonging to a certain server (main data)

          Parameters

          • guildId: string

          Returns Promise<{
              data: {
                  data: null | CachedOptions<Settings>;
                  users: CachedOptions<Users>[];
                  weekly: CachedOptions<Weekly>[];
              };
              message: string;
              status: boolean;
          }>

    • fetchAll: ((guildIds?) => Promise<{
          message: string;
          status: false;
      } | {
          data: never[] | (FlattenMaps<Settings> & {
              _id: ObjectId;
          })[];
          status: true;
      }>)
        • (guildIds?): Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Settings> & {
                  _id: ObjectId;
              })[];
              status: true;
          }>
        • Fetch multiple servers data

          Parameters

          • Optional guildIds: string[]

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Settings> & {
                  _id: ObjectId;
              })[];
              status: true;
          }>

    • get: ((guildId) => Promise<{
          message: string;
          status: false;
      } | {
          data: FlattenMaps<Settings & {
              _id: ObjectId;
          }>;
          status: true;
      }>)
        • (guildId): Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Settings & {
                  _id: ObjectId;
              }>;
              status: true;
          }>
        • Get a certain server's data

          Parameters

          • guildId: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Settings & {
                  _id: ObjectId;
              }>;
              status: true;
          }>

    • ignore: {
          channels: ((guildId, channels) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          roles: ((guildId, roles) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          users: ((guildId, users) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • channels: ((guildId, channels) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, channels): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Toggle on/off certain channels from being ignored in a certain server. (they will not gain XP)

            Parameters

            • guildId: string
            • channels: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • roles: ((guildId, roles) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, roles): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Toggle on/off certain roles from being ignored in a certain server. (they will not gain XP)

            Parameters

            • guildId: string
            • roles: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • users: ((guildId, users) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, users): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Toggle on/off certain users from being ignored in a certain server. (they will not gain XP)

            Parameters

            • guildId: string
            • users: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

    • import: ((guildId, targetGuildId, type?) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (guildId, targetGuildId, type?): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Import leaderboards from other bots

          Parameters

          • guildId: string
          • targetGuildId: string
          • type: "mee6" | "amari" = "amari"

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • leaderboard: {
          formatted: (<D>(guildId, options?, forceStatic?, board?) => Promise<{
              message: string;
              status: false;
          } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>);
          get: (<D>(guildId, options?, board?) => Promise<{
              message: string;
              status: false;
          } | LeaderboardFormattedResponse<LeaderboardUser[]>>);
          setBackground: ((guildId, options) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • formatted: (<D>(guildId, options?, forceStatic?, board?) => Promise<{
            message: string;
            status: false;
        } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>)
      • get: (<D>(guildId, options?, board?) => Promise<{
            message: string;
            status: false;
        } | LeaderboardFormattedResponse<LeaderboardUser[]>>)
      • setBackground: ((guildId, options) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, options): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set the leaderboard background (or color) for a certain server NOTE: Only available to 'canvacord' leaderboard type

            Parameters

            • guildId: string
            • options: {
                  color?: null | string;
                  url?: null | string;
              }
              • Optional color?: null | string
              • Optional url?: null | string

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

    • levels: {
          add: ((guildId, level, options?) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          addRoles: ((guildId, level, roles) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          remove: ((guildId, level) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          removeRoles: ((guildId, level, roles) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          setMessage: ((guildId, options, level) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • add: ((guildId, level, options?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, level, options?): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Add a level to a certain server. NOTE: (add: Will add roles to the users once they level up, remove: Will remove roles from the user once they level up)

            Parameters

            • guildId: string
            • level: number
            • Optional options: {
                  add?: string[];
                  options?: OptionalOptions;
                  remove?: string[];
              }
              • Optional add?: string[]
              • Optional options?: OptionalOptions
              • Optional remove?: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • addRoles: ((guildId, level, roles) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, level, roles): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset a certain level's (ADD) roles These roles will get added once the user reaches this level

            Parameters

            • guildId: string
            • level: number
            • roles: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • remove: ((guildId, level) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, level): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Remove a certain level from a certain server.

            Parameters

            • guildId: string
            • level: number

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • removeRoles: ((guildId, level, roles) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, level, roles): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset a certain level's (REMOVE) roles These roles will get removed once the user reaches this level

            Parameters

            • guildId: string
            • level: number
            • roles: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • setMessage: ((guildId, options, level) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, options, level): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset a certain level's announcement message for a certain server.

            Parameters

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

    • multipliers: {
          add: ((guildId, multiplier, options?) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          channels: ((guildId, multiplier, channels) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          remove: ((guildId, multiplier) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          roles: ((guildId, multiplier, roles) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • add: ((guildId, multiplier, options?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, multiplier, options?): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Add a multiplier to a certain server.

            Parameters

            • guildId: string
            • multiplier: number
            • Optional options: {
                  channels?: string[];
                  roles?: string[];
              }
              • Optional channels?: string[]
              • Optional roles?: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • channels: ((guildId, multiplier, channels) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, multiplier, channels): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Add/Remove certain channels from being able to use this multiplier in a certain server.

            Parameters

            • guildId: string
            • multiplier: number
            • channels: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • remove: ((guildId, multiplier) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, multiplier): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Remove a multiplier from a certain server.

            Parameters

            • guildId: string
            • multiplier: number

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • roles: ((guildId, multiplier, roles) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, multiplier, roles): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Add/Remove certain roles from being able to use this multiplier in a certain server.

            Parameters

            • guildId: string
            • multiplier: number
            • roles: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

    • setXP: ((guildId, options) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (guildId, options): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Set the min/max XP earned for messages on a certain server.

          Parameters

          • guildId: string
          • options: {
                max?: number;
                min?: number;
            }
            • Optional max?: number
            • Optional min?: number

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • toggle: ((guildId, type) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (guildId, type): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Toggle on/off certain features for the server.

          Parameters

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • weekly: {
          setChannel: ((guildId, channelId) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          setRoles: ((guildId, roles) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • setChannel: ((guildId, channelId) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, channelId): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset a certain channel for the weekly leaderboard announcements

            Parameters

            • guildId: string
            • channelId: string

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • setRoles: ((guildId, roles) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (guildId, roles): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Set/Reset weekly leaderboard ping roles These role(s) will get mentioned when a new weekly leaderboard is posted.

            Parameters

            • guildId: string
            • roles: string[]

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

  • get users(): {
        appendXP: ((userId, guildId, xp, voiceMinutes?) => Promise<null | boolean>);
        create: ((userId, guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Users & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        delete: {
            all: ((userId) => Promise<{
                message: string;
                status: false;
            } | {
                data: never[] | (Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                })[];
                message: string;
                status: boolean;
            }>);
            guild: ((userId, guildId) => Promise<{
                message: string;
                status: false;
            } | {
                data: Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                };
                message: string;
                status: boolean;
            }>);
        };
        fetchAll: ((userId) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Users> & {
                _id: ObjectId;
            })[];
            status: true;
        }>);
        get: ((userId, guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Users & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        position: ((userId, guildId, sort?) => Promise<number>);
        purge: ((dry?, users) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Users> & {
                _id: ObjectId;
            })[];
            message: string;
            status: boolean;
        }>);
        setBackground: ((userId, guildId, background?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        setColor: ((userId, guildId, type, color?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        setLevel: ((userId, guildId, level) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        setXP: ((userId, guildId, xp) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        stats: {
            dec: ((userId, guildId, type, count?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            inc: ((userId, guildId, type, count?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        toggle: ((userId, guildId, type) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
    }
  • Returns {
        appendXP: ((userId, guildId, xp, voiceMinutes?) => Promise<null | boolean>);
        create: ((userId, guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Users & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        delete: {
            all: ((userId) => Promise<{
                message: string;
                status: false;
            } | {
                data: never[] | (Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                })[];
                message: string;
                status: boolean;
            }>);
            guild: ((userId, guildId) => Promise<{
                message: string;
                status: false;
            } | {
                data: Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                };
                message: string;
                status: boolean;
            }>);
        };
        fetchAll: ((userId) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Users> & {
                _id: ObjectId;
            })[];
            status: true;
        }>);
        get: ((userId, guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Users & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        position: ((userId, guildId, sort?) => Promise<number>);
        purge: ((dry?, users) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Users> & {
                _id: ObjectId;
            })[];
            message: string;
            status: boolean;
        }>);
        setBackground: ((userId, guildId, background?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        setColor: ((userId, guildId, type, color?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        setLevel: ((userId, guildId, level) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        setXP: ((userId, guildId, xp) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
        stats: {
            dec: ((userId, guildId, type, count?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
            inc: ((userId, guildId, type, count?) => Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>);
        };
        toggle: ((userId, guildId, type) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>);
    }

    • appendXP: ((userId, guildId, xp, voiceMinutes?) => Promise<null | boolean>)
        • (userId, guildId, xp, voiceMinutes?): Promise<null | boolean>
        • [WARNING]: This should only be used for internal use, as any XP added will trigger a "levelup" event

          Parameters

          • userId: string
          • guildId: string
          • xp: number
          • Optional voiceMinutes: number

          Returns Promise<null | boolean>

    • create: ((userId, guildId) => Promise<{
          message: string;
          status: false;
      } | {
          data: FlattenMaps<Users & {
              _id: ObjectId;
          }>;
          status: true;
      }>)
        • (userId, guildId): Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Users & {
                  _id: ObjectId;
              }>;
              status: true;
          }>
        • Create a user's profile in a certain server. NOTE: The package will automatically create it once they send a message or earn xp

          Parameters

          • userId: string
          • guildId: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Users & {
                  _id: ObjectId;
              }>;
              status: true;
          }>

    • delete: {
          all: ((userId) => Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (Document<unknown, {}, Users> & Users & {
                  _id: ObjectId;
              })[];
              message: string;
              status: boolean;
          }>);
          guild: ((userId, guildId) => Promise<{
              message: string;
              status: false;
          } | {
              data: Document<unknown, {}, Users> & Users & {
                  _id: ObjectId;
              };
              message: string;
              status: boolean;
          }>);
      }
      • all: ((userId) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (Document<unknown, {}, Users> & Users & {
                _id: ObjectId;
            })[];
            message: string;
            status: boolean;
        }>)
          • (userId): Promise<{
                message: string;
                status: false;
            } | {
                data: never[] | (Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                })[];
                message: string;
                status: boolean;
            }>
          • Delete all data for a user.

            Parameters

            • userId: string

            Returns Promise<{
                message: string;
                status: false;
            } | {
                data: never[] | (Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                })[];
                message: string;
                status: boolean;
            }>

      • guild: ((userId, guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: Document<unknown, {}, Users> & Users & {
                _id: ObjectId;
            };
            message: string;
            status: boolean;
        }>)
          • (userId, guildId): Promise<{
                message: string;
                status: false;
            } | {
                data: Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                };
                message: string;
                status: boolean;
            }>
          • Delete a user's data for a certain server.

            Parameters

            • userId: string
            • guildId: string

            Returns Promise<{
                message: string;
                status: false;
            } | {
                data: Document<unknown, {}, Users> & Users & {
                    _id: ObjectId;
                };
                message: string;
                status: boolean;
            }>

    • fetchAll: ((userId) => Promise<{
          message: string;
          status: false;
      } | {
          data: never[] | (FlattenMaps<Users> & {
              _id: ObjectId;
          })[];
          status: true;
      }>)
        • (userId): Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Users> & {
                  _id: ObjectId;
              })[];
              status: true;
          }>
        • Get all profile data for a server

          Parameters

          • userId: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Users> & {
                  _id: ObjectId;
              })[];
              status: true;
          }>

    • get: ((userId, guildId) => Promise<{
          message: string;
          status: false;
      } | {
          data: FlattenMaps<Users & {
              _id: ObjectId;
          }>;
          status: true;
      }>)
        • (userId, guildId): Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Users & {
                  _id: ObjectId;
              }>;
              status: true;
          }>
        • Get a user's profile data for a server.

          Parameters

          • userId: string
          • guildId: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Users & {
                  _id: ObjectId;
              }>;
              status: true;
          }>

    • position: ((userId, guildId, sort?) => Promise<number>)
        • (userId, guildId, sort?): Promise<number>
        • Get a user's rank position for a server.

          Parameters

          • userId: string
          • guildId: string
          • Optional sort: "ascending" | "descending"

          Returns Promise<number>

    • purge: ((dry?, users) => Promise<{
          message: string;
          status: false;
      } | {
          data: never[] | (FlattenMaps<Users> & {
              _id: ObjectId;
          })[];
          message: string;
          status: boolean;
      }>)
        • (dry?, users): Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Users> & {
                  _id: ObjectId;
              })[];
              message: string;
              status: boolean;
          }>
        • Mass delete certain users data from the system NOTE: Deletes ALL the users profiles for ALL servers

          Parameters

          • dry: boolean = true
          • users: string[]

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Users> & {
                  _id: ObjectId;
              })[];
              message: string;
              status: boolean;
          }>

    • setBackground: ((userId, guildId, background?) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (userId, guildId, background?): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Set/Reset a background for a user on a certain server.

          Parameters

          • userId: string
          • guildId: string
          • Optional background: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • setColor: ((userId, guildId, type, color?) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (userId, guildId, type, color?): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Set/Reset color(s) for a user on a certain server.

          Parameters

          • userId: string
          • guildId: string
          • type: ColorType
          • Optional color: string | number

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • setLevel: ((userId, guildId, level) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (userId, guildId, level): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Set a level for a user on a certain server.

          Parameters

          • userId: string
          • guildId: string
          • level: number

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • setXP: ((userId, guildId, xp) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (userId, guildId, xp): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Set XP for a user on a certain server.

          Parameters

          • userId: string
          • guildId: string
          • xp: number

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

    • stats: {
          dec: ((userId, guildId, type, count?) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
          inc: ((userId, guildId, type, count?) => Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>);
      }
      • dec: ((userId, guildId, type, count?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (userId, guildId, type, count?): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Decrements the stats count for the type provided.

            • Supports custom stats counters (default: 'messages', 'voice')
            • 'voice' is total minutes spent in a voice channel.

            Parameters

            • userId: string
            • guildId: string
            • type: string
            • count: number = 1

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

      • inc: ((userId, guildId, type, count?) => Promise<{
            message: string;
            status: false;
        } | {
            message: string;
            status: true;
        }>)
          • (userId, guildId, type, count?): Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>
          • Increments the stats count for the type provided.

            • Supports custom stats counters (default: 'messages', 'voice')
            • 'voice' is total minutes spent in a voice channel.

            Parameters

            • userId: string
            • guildId: string
            • type: string
            • count: number = 1

            Returns Promise<{
                message: string;
                status: false;
            } | {
                message: string;
                status: true;
            }>

    • toggle: ((userId, guildId, type) => Promise<{
          message: string;
          status: false;
      } | {
          message: string;
          status: true;
      }>)
        • (userId, guildId, type): Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>
        • Toggle certain features for a user on a server.

          Parameters

          Returns Promise<{
              message: string;
              status: false;
          } | {
              message: string;
              status: true;
          }>

  • get weekly(): {
        fetchAll: ((guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Weekly> & {
                _id: ObjectId;
            })[];
            status: true;
        }>);
        get: ((guildId, weeklyId?) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Weekly & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        leaderboard: ((guildId, weeklyId?, options?) => Promise<{
            message: string;
            status: false;
        } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>);
    }
  • Returns {
        fetchAll: ((guildId) => Promise<{
            message: string;
            status: false;
        } | {
            data: never[] | (FlattenMaps<Weekly> & {
                _id: ObjectId;
            })[];
            status: true;
        }>);
        get: ((guildId, weeklyId?) => Promise<{
            message: string;
            status: false;
        } | {
            data: FlattenMaps<Weekly & {
                _id: ObjectId;
            }>;
            status: true;
        }>);
        leaderboard: ((guildId, weeklyId?, options?) => Promise<{
            message: string;
            status: false;
        } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>);
    }

    • fetchAll: ((guildId) => Promise<{
          message: string;
          status: false;
      } | {
          data: never[] | (FlattenMaps<Weekly> & {
              _id: ObjectId;
          })[];
          status: true;
      }>)
        • (guildId): Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Weekly> & {
                  _id: ObjectId;
              })[];
              status: true;
          }>
        • Get all of the weekly data for a server.

          Parameters

          • guildId: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: never[] | (FlattenMaps<Weekly> & {
                  _id: ObjectId;
              })[];
              status: true;
          }>

    • get: ((guildId, weeklyId?) => Promise<{
          message: string;
          status: false;
      } | {
          data: FlattenMaps<Weekly & {
              _id: ObjectId;
          }>;
          status: true;
      }>)
        • (guildId, weeklyId?): Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Weekly & {
                  _id: ObjectId;
              }>;
              status: true;
          }>
        • Get a server's weekly data (or a certain weeklyId's info)

          Parameters

          • guildId: string
          • Optional weeklyId: string

          Returns Promise<{
              message: string;
              status: false;
          } | {
              data: FlattenMaps<Weekly & {
                  _id: ObjectId;
              }>;
              status: true;
          }>

    • leaderboard: ((guildId, weeklyId?, options?) => Promise<{
          message: string;
          status: false;
      } | LeaderboardFormattedResponse<LeaderboardFormatted[]>>)

Methods

  • Parameters

    • guildId: string
    • type: "roles" | "channels" | "users"
    • arr: string[]

    Returns Promise<{
        message: string;
        status: false;
    } | {
        message: string;
        status: true;
    }>

Generated using TypeDoc