mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-31 13:34:24 +00:00
Initial work on quests
This commit is contained in:
@@ -168,6 +168,9 @@ export class User extends BaseClass {
|
||||
@Column({ type: "simple-array", nullable: true })
|
||||
badge_ids?: string[];
|
||||
|
||||
@Column()
|
||||
currency: number = 0; // virtual currency amount
|
||||
|
||||
// TODO: I don't like this method?
|
||||
validate() {
|
||||
if (this.discriminator) {
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
Snowflake,
|
||||
} from "@spacebar/util";
|
||||
import { JsonValue } from "@protobuf-ts/runtime";
|
||||
import { ApplicationCommand, GuildCreateResponse, PartialEmoji, PublicMember, PublicUser, PublicVoiceState, RelationshipType, UserPrivate } from "@spacebar/schemas";
|
||||
import { ApplicationCommand, GuildCreateResponse, PartialEmoji, PublicMember, PublicUser, PublicVoiceState, QuestUserStatusSchema, RelationshipType, UserPrivate } from "@spacebar/schemas";
|
||||
|
||||
export interface Event {
|
||||
guild_id?: string;
|
||||
@@ -608,6 +608,13 @@ export interface GuildMemberListUpdate extends Event {
|
||||
};
|
||||
}
|
||||
|
||||
export interface QuestsUserStatusUpdate extends Event {
|
||||
event: "QUESTS_USER_STATUS_UPDATE";
|
||||
data: {
|
||||
user_status: QuestUserStatusSchema;
|
||||
};
|
||||
}
|
||||
|
||||
export type EventData =
|
||||
| InvalidatedEvent
|
||||
| ReadyEvent
|
||||
@@ -658,7 +665,8 @@ export type EventData =
|
||||
| InteractionFailureEvent
|
||||
| MessageAckEvent
|
||||
| RelationshipAddEvent
|
||||
| RelationshipRemoveEvent;
|
||||
| RelationshipRemoveEvent
|
||||
| QuestsUserStatusUpdate;
|
||||
|
||||
// located in collection events
|
||||
|
||||
@@ -712,6 +720,7 @@ export enum EVENTEnum {
|
||||
ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE",
|
||||
ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE",
|
||||
SessionsReplace = "SESSIONS_REPLACE",
|
||||
QuestsUserStatusUpdate = "QUESTS_USER_STATUS_UPDATE",
|
||||
}
|
||||
|
||||
export type EVENT =
|
||||
@@ -775,6 +784,7 @@ export type EVENT =
|
||||
| "RELATIONSHIP_UPDATE"
|
||||
| "SESSIONS_REPLACE"
|
||||
| "USER_SETTINGS_PROTO_UPDATE"
|
||||
| "QUESTS_USER_STATUS_UPDATE"
|
||||
| CUSTOMEVENTS;
|
||||
|
||||
export type CUSTOMEVENTS = "INVALIDATED" | "RATELIMIT";
|
||||
|
||||
Reference in New Issue
Block a user