Skip to content

Built-in Events ​

All events inherit from the PluginEvent base class.

Base Class ​

PluginEvent ​

Base class for all plugin events, inherits from pydantic.BaseModel.

python
from app.models.events import PluginEvent

User Events ​

UserRegisteredEvent ​

Trigger: Triggered when a user registers an account.

FieldTypeDescription
user_idintUser ID
usernamestrUsername
country_codestrCountry/Region Code

Chat Events ​

MessageSentEvent ​

Trigger: Triggered when a user sends a message in chat.

FieldTypeDescription
sender_idintSender user ID
channel_idintChannel ID
message_contentstrMessage content
timestampdatetimeSend time
typeMessageTypeMessage type
is_bot_commandboolIs bot command

JoinChannelEvent ​

Trigger: Triggered when a user joins a chat channel.

FieldTypeDescription
user_idintUser ID
channel_idintChannel ID

LeaveChannelEvent ​

Trigger: Triggered when a user leaves a chat channel.

FieldTypeDescription
user_idintUser ID
channel_idintChannel ID

Score Events ​

ScoreCreatedEvent ​

Trigger: Triggered when a new score is created.

FieldTypeDescription
user_idintUser ID
beatmap_idintBeatmap ID
beatmap_hashstrBeatmap hash
gamemodeGameModeGame mode
score_tokenintScore token
score_typeScoreTypeScore type

SoloScoreCreatedEvent ​

Inherits from: ScoreCreatedEvent

Trigger: Triggered when a new solo score is created.

FieldTypeDescription
score_typeScoreTypeFixed to ScoreType.SOLO

MultiplayerScoreCreatedEvent ​

Inherits from: ScoreCreatedEvent

Trigger: Triggered when a new multiplayer score is created.

FieldTypeDescription
score_typeScoreTypeFixed to ScoreType.MULTIPLAYER
room_idintRoom ID
playlist_idintPlaylist ID

ScoreSubmittedEvent ​

Trigger: Triggered when a score is submitted for processing.

FieldTypeDescription
user_idintUser ID
submission_infoSoloScoreSubmissionInfoSubmission info
score_typeScoreTypeScore type

SoloScoreSubmittedEvent ​

Inherits from: ScoreSubmittedEvent

Trigger: Triggered when a solo score is submitted for processing.

FieldTypeDescription
score_typeScoreTypeFixed to ScoreType.SOLO

MultiplayerScoreSubmittedEvent ​

Inherits from: ScoreSubmittedEvent

Trigger: Triggered when a multiplayer score is submitted for processing.

FieldTypeDescription
score_typeScoreTypeFixed to ScoreType.MULTIPLAYER
room_idintRoom ID
playlist_idintPlaylist ID

ScoreProcessedEvent ​

Trigger: Triggered when score processing is complete.

FieldTypeDescription
score_idintScore ID

ScoreDeletedEvent ​

Trigger: Triggered when a score is deleted.

FieldTypeDescription
score_idintScore ID

ReplayUploadedEvent ​

Trigger: Triggered when a replay file is uploaded.

FieldTypeDescription
score_idintScore ID
uploader_user_idintUploader user ID
file_pathstrFile path
replay_databytesReplay data

ReplayDownloadedEvent ​

Trigger: Triggered when a replay file is downloaded.

FieldTypeDescription
score_idintScore ID
owner_user_idintReplay owner user ID
downloader_user_idint | NoneDownloader user ID (optional)

Beatmap Fetch Events ​

FetchingBeatmapRawEvent ​

Trigger: Triggered when starting to fetch raw beatmap content (.osu file).

FieldTypeDescription
beatmap_idintBeatmap ID

BeatmapRawFetchedEvent ​

Trigger: Triggered after successfully fetching raw beatmap content.

FieldTypeDescription
beatmap_idintBeatmap ID
beatmap_rawstrRaw beatmap content

FetchingBeatmapEvent ​

Trigger: Triggered when starting to fetch beatmap data from API.

FieldTypeDescription
beatmap_idint | NoneBeatmap ID (optional)
beatmap_checksumstr | NoneBeatmap checksum (optional)

BeatmapFetchedEvent ​

Trigger: Triggered after successfully fetching beatmap data from API.

FieldTypeDescription
beatmap_idintBeatmap ID
beatmap_datadictBeatmap data

FetchingBeatmapsetEvent ​

Trigger: Triggered when starting to fetch beatmapset data from API.

FieldTypeDescription
beatmapset_idintBeatmapset ID

BeatmapsetFetchedEvent ​

Trigger: Triggered after successfully fetching beatmapset data from API.

FieldTypeDescription
beatmapset_idintBeatmapset ID
beatmapset_datadictBeatmapset data

PP Calculation Events ​

BeforeCalculatingPPEvent ​

Trigger: Triggered before starting to calculate PP for a score.

FieldTypeDescription
score_idintScore ID
beatmap_rawstrRaw beatmap content

AfterCalculatingPPEvent ​

Trigger: Triggered after PP calculation for a score is complete.

FieldTypeDescription
score_idintScore ID
beatmap_rawstrRaw beatmap content
performance_attributePerformanceAttributesPerformance attributes

HTTP Events ​

RequestReceivedEvent ​

Trigger: Triggered when the server receives an HTTP request.

FieldTypeDescription
timefloatRequest received time
requestRequestStarlette request object

RequestHandledEvent ​

Trigger: Triggered when HTTP request processing is complete.

FieldTypeDescription
timefloatRequest handled time
requestRequestStarlette request object
responseAnyResponse object

Enum Types ​

ScoreType ​

Score type enum.

ValueDescription
SOLOSolo game
MULTIPLAYERMultiplayer

Released under the MIT License