Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a beatmap with general information.

Type Parameters

  • HasBeatmap extends boolean = boolean

Hierarchy

  • MapInfo

Index

Constructors

  • new MapInfo<HasBeatmap>(): MapInfo<HasBeatmap>
  • Type Parameters

    • HasBeatmap extends boolean = boolean

    Returns MapInfo<HasBeatmap>

Properties

aimDifficulty: number = 0

The aim difficulty rating of the beatmap.

approved: rankedStatus = 0

The ranking status of the beatmap.

ar: number = 0

The approach rate of the beatmap.

artist: string = ""

The artist of the song of the beatmap.

beatmapID: number = 0

The ID of the beatmap.

beatmapsetID: number = 0

The ID of the beatmapset containing the beatmap.

bpm: number = 0

The BPM of the beatmap.

circles: number = 0

The amount of circles in the beatmap.

creator: string = ""

The creator of the beatmap.

cs: number = 0

The circle size of the beatmap.

favorites: number = 0

The amount of times the beatmap has been favorited.

hash: string = ""

The MD5 hash of the beatmap.

hitLength: number = 0

The duration of the beatmap not including breaks.

hp: number = 0

The health drain rate of the beatmap.

lastUpdate: Date = ...

The date of which the beatmap was last updated.

maxCombo: number = 0

The maximum combo of the beatmap.

od: number = 0

The overall difficulty of the beatmap.

packs: string[] = []

The beatmap packs that contain this beatmap, represented by their ID.

plays: number = 0

The amount of times the beatmap has been played.

sliders: number = 0

The amount of sliders in the beatmap.

source: string = ""

The source of the song, if any.

speedDifficulty: number = 0

The speed difficulty rating of the beatmap.

spinners: number = 0

The amount of spinners in the beatmap.

storyboardAvailable: boolean = false

Whether or not this beatmap has a storyboard.

submitDate: Date = ...

The date of which the beatmap was submitted.

title: string = ""

The title of the song of the beatmap.

totalDifficulty: number = 0

The generic difficulty rating of the beatmap.

totalLength: number = 0

The duration of the beatmap including breaks.

version: string = ""

The difficulty name of the beatmap.

videoAvailable: boolean = false

Whether or not this beatmap has a video.

Accessors

  • get fullTitle(): string
  • get objects(): number
  • get statusColor(): number

Methods

  • convertStatus(): string
  • hasDownloadedBeatmap(): this is MapInfo<true>
  • retrieveBeatmapFile(force?: boolean): Promise<void>
  • Retrieves the .osu file of the beatmap.

    After this, you can use the hasDownloadedBeatmap method to check if the beatmap has been downloaded.

    Parameters

    • Optional force: boolean

      Whether to download the file regardless if it's already available.

    Returns Promise<void>

  • showStatistics(option: number, stats?: MapStats): string
  • Shows the beatmap's statistics based on applied statistics and option.

    • Option 0: return map title and mods used if defined
    • Option 1: return song source and map download link to beatmap mirrors
    • Option 2: return circle, slider, and spinner count
    • Option 3: return CS, AR, OD, HP, and max score statistics for droid
    • Option 4: return CS, AR, OD, HP, and max score statistics for PC
    • Option 5: return BPM, map length, and max combo
    • Option 6: return last update date and map status
    • Option 7: return favorite count and play count

    Parameters

    • option: number

      The option to pick.

    • Optional stats: MapStats

      The custom statistics to apply. This will only be used to apply mods, custom speed multiplier, and force AR.

    Returns string

  • toString(): string
  • getInformation(beatmapId: number, downloadBeatmap?: boolean): Promise<null | MapInfo<true>>
  • getInformation(beatmapId: number, downloadBeatmap: false): Promise<null | MapInfo<false>>
  • getInformation(hash: string, downloadBeatmap?: boolean): Promise<null | MapInfo<true>>
  • getInformation(hash: string, downloadBeatmap: false): Promise<null | MapInfo<false>>
  • Retrieve a beatmap's general information.

    Parameters

    • beatmapId: number

      The ID of the beatmap.

    • Optional downloadBeatmap: boolean

      Whether to also retrieve the .osu file of the beatmap. Defaults to true.

    Returns Promise<null | MapInfo<true>>

    The beatmap, null if the beatmap is not found or the beatmap is not an osu!standard beatmap.

  • Retrieve a beatmap's general information.

    Parameters

    • beatmapId: number

      The ID of the beatmap.

    • downloadBeatmap: false

      Whether to also retrieve the .osu file of the beatmap. Defaults to true.

    Returns Promise<null | MapInfo<false>>

    The beatmap, null if the beatmap is not found or the beatmap is not an osu!standard beatmap.

  • Retrieve a beatmap's general information.

    Parameters

    • hash: string

      The MD5 hash of the beatmap.

    • Optional downloadBeatmap: boolean

      Whether to also retrieve the .osu file of the beatmap. Defaults to true.

    Returns Promise<null | MapInfo<true>>

    The beatmap, null if the beatmap is not found or the beatmap is not an osu!standard beatmap.

  • Retrieve a beatmap's general information.

    Parameters

    • hash: string

      The MD5 hash of the beatmap.

    • downloadBeatmap: false

      Whether to also retrieve the .osu file of the beatmap. Defaults to true.

    Returns Promise<null | MapInfo<false>>

    The beatmap, null if the beatmap is not found or the beatmap is not an osu!standard beatmap.

Generated using TypeDoc