mirror of
https://github.com/spacebarchat/server.git
synced 2025-01-31 19:51:37 +01:00
🔧 build
This commit is contained in:
parent
1f7ebe256e
commit
673e691c6e
5
.prettierrc
Normal file
5
.prettierrc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"useTabs": true,
|
||||
"printWidth": 120
|
||||
}
|
16
dist/index.d.ts
vendored
16
dist/index.d.ts
vendored
@ -2,14 +2,20 @@ import { checkToken } from "./util/checkToken";
|
||||
import Config, { DefaultOptions } from "./util/Config";
|
||||
import db from "./util/Database";
|
||||
import * as Constants from "./util/Constants";
|
||||
import { Channel } from "./models/Channel";
|
||||
import { Channel, ChannelType, DMChannel, GuildChannel, ReadState, TextBasedChannel, TextChannel, VoiceChannel } from "./models/Channel";
|
||||
import { Emoji } from "./models/Emoji";
|
||||
import { Guild } from "./models/Guild";
|
||||
import { Event } from "./models/Event";
|
||||
import { Invite } from "./models/Invite";
|
||||
import { Member } from "./models/Member";
|
||||
import { Member, MuteConfig, PublicMember, UserGuildSettings } from "./models/Member";
|
||||
import { Role } from "./models/Role";
|
||||
import { User } from "./models/User";
|
||||
import { User, ConnectedAccount, PublicUser, Relationship, UserSettings } from "./models/User";
|
||||
import { Activity, ActivityType, Presence } from "./models/Activity";
|
||||
import { ApplicationCommand, ApplicationCommandInteractionData, ApplicationCommandInteractionDataOption, ApplicationCommandOption, ApplicationCommandOptionChoice, ApplicationCommandOptionType } from "./models/Application";
|
||||
import { ApplicationCommandPayload, EVENT, Event, MessagePayload } from "./models/Event";
|
||||
import { Interaction, InteractionApplicationCommandCallbackData, InteractionResponseType, InteractionType } from "./models/Interaction";
|
||||
import { AllowedMentions, Attachment, Embed, EmbedImage, Message, MessageType, PartialEmoji, Reaction } from "./models/Message";
|
||||
import { ClientStatus, Status } from "./models/Status";
|
||||
import { VoiceState } from "./models/VoiceState";
|
||||
import { trimSpecial } from "./util/String";
|
||||
import { BitField } from "./util/BitField";
|
||||
import { Intents } from "./util/Intents";
|
||||
@ -17,4 +23,4 @@ import { MessageFlags } from "./util/MessageFlags";
|
||||
import { Permissions } from "./util/Permissions";
|
||||
import { Snowflake } from "./util/Snowflake";
|
||||
import { UserFlags } from "./util/UserFlags";
|
||||
export { trimSpecial, checkToken, Config, Constants, db, BitField, DefaultOptions, Permissions, MessageFlags, UserFlags, Snowflake, Intents, Channel, Event, Emoji, Guild, Invite, Member, Role, User, };
|
||||
export { trimSpecial, checkToken, Config, Constants, db, Activity, ActivityType, Presence, BitField, DefaultOptions, Permissions, VoiceState, Snowflake, Intents, Channel, ChannelType, DMChannel, GuildChannel, ReadState, TextBasedChannel, TextChannel, VoiceChannel, Emoji, Guild, Invite, Member, ClientStatus, Status, MuteConfig, PublicMember, UserGuildSettings, Role, User, UserFlags, UserSettings, ConnectedAccount, PublicUser, Relationship, EVENT, Event, MessageType, Message, MessageFlags, MessagePayload, AllowedMentions, Attachment, Embed, EmbedImage, PartialEmoji, Reaction, Interaction, InteractionApplicationCommandCallbackData, InteractionResponseType, InteractionType, ApplicationCommand, ApplicationCommandPayload, ApplicationCommandInteractionData, ApplicationCommandInteractionDataOption, ApplicationCommandOption, ApplicationCommandOptionChoice, ApplicationCommandOptionType, };
|
||||
|
13
dist/index.js
vendored
13
dist/index.js
vendored
@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Intents = exports.Snowflake = exports.UserFlags = exports.MessageFlags = exports.Permissions = exports.DefaultOptions = exports.BitField = exports.db = exports.Constants = exports.Config = exports.checkToken = exports.trimSpecial = void 0;
|
||||
exports.ApplicationCommandOptionType = exports.InteractionType = exports.InteractionResponseType = exports.MessageFlags = exports.MessageType = exports.UserFlags = exports.ChannelType = exports.Intents = exports.Snowflake = exports.Permissions = exports.DefaultOptions = exports.BitField = exports.ActivityType = exports.db = exports.Constants = exports.Config = exports.checkToken = exports.trimSpecial = void 0;
|
||||
const checkToken_1 = require("./util/checkToken");
|
||||
Object.defineProperty(exports, "checkToken", { enumerable: true, get: function () { return checkToken_1.checkToken; } });
|
||||
const Config_1 = __importStar(require("./util/Config"));
|
||||
@ -32,6 +32,17 @@ const Database_1 = __importDefault(require("./util/Database"));
|
||||
exports.db = Database_1.default;
|
||||
const Constants = __importStar(require("./util/Constants"));
|
||||
exports.Constants = Constants;
|
||||
const Channel_1 = require("./models/Channel");
|
||||
Object.defineProperty(exports, "ChannelType", { enumerable: true, get: function () { return Channel_1.ChannelType; } });
|
||||
const Activity_1 = require("./models/Activity");
|
||||
Object.defineProperty(exports, "ActivityType", { enumerable: true, get: function () { return Activity_1.ActivityType; } });
|
||||
const Application_1 = require("./models/Application");
|
||||
Object.defineProperty(exports, "ApplicationCommandOptionType", { enumerable: true, get: function () { return Application_1.ApplicationCommandOptionType; } });
|
||||
const Interaction_1 = require("./models/Interaction");
|
||||
Object.defineProperty(exports, "InteractionResponseType", { enumerable: true, get: function () { return Interaction_1.InteractionResponseType; } });
|
||||
Object.defineProperty(exports, "InteractionType", { enumerable: true, get: function () { return Interaction_1.InteractionType; } });
|
||||
const Message_1 = require("./models/Message");
|
||||
Object.defineProperty(exports, "MessageType", { enumerable: true, get: function () { return Message_1.MessageType; } });
|
||||
const String_1 = require("./util/String");
|
||||
Object.defineProperty(exports, "trimSpecial", { enumerable: true, get: function () { return String_1.trimSpecial; } });
|
||||
const BitField_1 = require("./util/BitField");
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA+C;AAwB9C,2FAxBQ,uBAAU,OAwBR;AAvBX,wDAAuD;AAwBtD,iBAxBM,gBAAM,CAwBN;AAIN,+FA5BgB,uBAAc,OA4BhB;AA3Bf,+DAAiC;AAyBhC,aAzBM,kBAAE,CAyBN;AAvBH,4DAA8C;AAsB7C,8BAAS;AAZV,0CAA4C;AAS3C,4FATQ,oBAAW,OASR;AARZ,8CAA2C;AAa1C,yFAbQ,mBAAQ,OAaR;AAZT,4CAAyC;AAkBxC,wFAlBQ,iBAAO,OAkBR;AAjBR,sDAAmD;AAclD,6FAdQ,2BAAY,OAcR;AAbb,oDAAiD;AAYhD,4FAZQ,yBAAW,OAYR;AAXZ,gDAA6C;AAc5C,0FAdQ,qBAAS,OAcR;AAbV,gDAA6C;AAY5C,0FAZQ,qBAAS,OAYR"}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA+C;AA4D9C,2FA5DQ,uBAAU,OA4DR;AA3DX,wDAAuD;AA4DtD,iBA5DM,gBAAM,CA4DN;AAON,+FAnEgB,uBAAc,OAmEhB;AAlEf,+DAAiC;AA6DhC,aA7DM,kBAAE,CA6DN;AA3DH,4DAA8C;AA0D7C,8BAAS;AAzDV,8CAS0B;AA4DzB,4FAnEA,qBAAW,OAmEA;AArDZ,gDAAqE;AA4CpE,6FA5CkB,uBAAY,OA4ClB;AA3Cb,sDAO8B;AA0F7B,6GA3FA,0CAA4B,OA2FA;AAxF7B,sDAK8B;AA2E7B,wGA7EA,qCAAuB,OA6EA;AACvB,gGA7EA,6BAAe,OA6EA;AA3EhB,8CAS0B;AAqDzB,4FAxDA,qBAAW,OAwDA;AAjDZ,0CAA4C;AAS3C,4FATQ,oBAAW,OASR;AARZ,8CAA2C;AAgB1C,yFAhBQ,mBAAQ,OAgBR;AAfT,4CAAyC;AAoBxC,wFApBQ,iBAAO,OAoBR;AAnBR,sDAAmD;AAgDlD,6FAhDQ,2BAAY,OAgDR;AA/Cb,oDAAiD;AAehD,4FAfQ,yBAAW,OAeR;AAdZ,gDAA6C;AAgB5C,0FAhBQ,qBAAS,OAgBR;AAfV,gDAA6C;AAoC5C,0FApCQ,qBAAS,OAoCR"}
|
51
dist/models/Activity.d.ts
vendored
Normal file
51
dist/models/Activity.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import { User } from "..";
|
||||
import { ClientStatus, Status } from "./Status";
|
||||
export interface Presence {
|
||||
user: User;
|
||||
guild_id: bigint;
|
||||
status: Status;
|
||||
activities: Activity[];
|
||||
client_status: ClientStatus;
|
||||
}
|
||||
export interface Activity {
|
||||
name: string;
|
||||
type: ActivityType;
|
||||
url?: string;
|
||||
created_at: number;
|
||||
timestamps?: {
|
||||
start: number;
|
||||
end: number;
|
||||
}[];
|
||||
application_id?: bigint;
|
||||
details?: string;
|
||||
state?: string;
|
||||
emoji?: {
|
||||
name: string;
|
||||
id?: bigint;
|
||||
amimated?: boolean;
|
||||
};
|
||||
party?: {
|
||||
id?: string;
|
||||
size?: [number, number];
|
||||
};
|
||||
assets?: {
|
||||
large_image: string;
|
||||
large_text: string;
|
||||
small_image: string;
|
||||
small_text: string;
|
||||
};
|
||||
secrets?: {
|
||||
join?: string;
|
||||
spectate?: string;
|
||||
match?: string;
|
||||
};
|
||||
instance?: boolean;
|
||||
flags?: bigint;
|
||||
}
|
||||
export declare enum ActivityType {
|
||||
GAME = 0,
|
||||
STREAMING = 1,
|
||||
LISTENING = 2,
|
||||
CUSTOM = 4,
|
||||
COMPETING = 5
|
||||
}
|
12
dist/models/Activity.js
vendored
Normal file
12
dist/models/Activity.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ActivityType = void 0;
|
||||
var ActivityType;
|
||||
(function (ActivityType) {
|
||||
ActivityType[ActivityType["GAME"] = 0] = "GAME";
|
||||
ActivityType[ActivityType["STREAMING"] = 1] = "STREAMING";
|
||||
ActivityType[ActivityType["LISTENING"] = 2] = "LISTENING";
|
||||
ActivityType[ActivityType["CUSTOM"] = 4] = "CUSTOM";
|
||||
ActivityType[ActivityType["COMPETING"] = 5] = "COMPETING";
|
||||
})(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
|
||||
//# sourceMappingURL=Activity.js.map
|
1
dist/models/Activity.js.map
vendored
Normal file
1
dist/models/Activity.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../src/models/Activity.ts"],"names":[],"mappings":";;;AA+CA,IAAY,YAMX;AAND,WAAY,YAAY;IACvB,+CAAQ,CAAA;IACR,yDAAa,CAAA;IACb,yDAAa,CAAA;IACb,mDAAU,CAAA;IACV,yDAAa,CAAA;AACd,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
|
39
dist/models/Application.d.ts
vendored
Normal file
39
dist/models/Application.d.ts
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
export interface ApplicationCommand {
|
||||
id: bigint;
|
||||
application_id: bigint;
|
||||
name: string;
|
||||
description: string;
|
||||
options?: ApplicationCommandOption[];
|
||||
}
|
||||
export interface ApplicationCommandOption {
|
||||
type: ApplicationCommandOptionType;
|
||||
name: string;
|
||||
description: string;
|
||||
required?: boolean;
|
||||
choices?: ApplicationCommandOptionChoice[];
|
||||
options?: ApplicationCommandOption[];
|
||||
}
|
||||
export interface ApplicationCommandOptionChoice {
|
||||
name: string;
|
||||
value: string | number;
|
||||
}
|
||||
export declare enum ApplicationCommandOptionType {
|
||||
SUB_COMMAND = 1,
|
||||
SUB_COMMAND_GROUP = 2,
|
||||
STRING = 3,
|
||||
INTEGER = 4,
|
||||
BOOLEAN = 5,
|
||||
USER = 6,
|
||||
CHANNEL = 7,
|
||||
ROLE = 8
|
||||
}
|
||||
export interface ApplicationCommandInteractionData {
|
||||
id: bigint;
|
||||
name: string;
|
||||
options?: ApplicationCommandInteractionDataOption[];
|
||||
}
|
||||
export interface ApplicationCommandInteractionDataOption {
|
||||
name: string;
|
||||
value?: any;
|
||||
options?: ApplicationCommandInteractionDataOption[];
|
||||
}
|
15
dist/models/Application.js
vendored
Normal file
15
dist/models/Application.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationCommandOptionType = void 0;
|
||||
var ApplicationCommandOptionType;
|
||||
(function (ApplicationCommandOptionType) {
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["SUB_COMMAND"] = 1] = "SUB_COMMAND";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["SUB_COMMAND_GROUP"] = 2] = "SUB_COMMAND_GROUP";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["STRING"] = 3] = "STRING";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["INTEGER"] = 4] = "INTEGER";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["BOOLEAN"] = 5] = "BOOLEAN";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["USER"] = 6] = "USER";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["CHANNEL"] = 7] = "CHANNEL";
|
||||
ApplicationCommandOptionType[ApplicationCommandOptionType["ROLE"] = 8] = "ROLE";
|
||||
})(ApplicationCommandOptionType = exports.ApplicationCommandOptionType || (exports.ApplicationCommandOptionType = {}));
|
||||
//# sourceMappingURL=Application.js.map
|
1
dist/models/Application.js.map
vendored
Normal file
1
dist/models/Application.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../src/models/Application.ts"],"names":[],"mappings":";;;AAsBA,IAAY,4BASX;AATD,WAAY,4BAA4B;IACvC,6FAAe,CAAA;IACf,yGAAqB,CAAA;IACrB,mFAAU,CAAA;IACV,qFAAW,CAAA;IACX,qFAAW,CAAA;IACX,+EAAQ,CAAA;IACR,qFAAW,CAAA;IACX,+EAAQ,CAAA;AACT,CAAC,EATW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QASvC"}
|
45
dist/models/Channel.d.ts
vendored
45
dist/models/Channel.d.ts
vendored
@ -1,15 +1,24 @@
|
||||
export interface Channel {
|
||||
id: bigint;
|
||||
guild_id: bigint;
|
||||
last_message_id: string;
|
||||
last_pin_timestamp: string;
|
||||
created_at: number;
|
||||
name: string;
|
||||
nsfw: boolean;
|
||||
parent_id: bigint;
|
||||
position: number;
|
||||
rate_limit_per_user: number;
|
||||
topic: string | null;
|
||||
type: number;
|
||||
read_state: ReadState[];
|
||||
}
|
||||
export interface ReadState {
|
||||
last_message_id: bigint;
|
||||
last_pin_timestamp: number;
|
||||
mention_count: number;
|
||||
}
|
||||
export interface TextBasedChannel {
|
||||
messages: any[];
|
||||
last_message_id?: bigint;
|
||||
last_pin_timestamp?: number;
|
||||
}
|
||||
export interface GuildChannel extends Channel {
|
||||
guild_id: bigint;
|
||||
position: number;
|
||||
parent_id?: bigint;
|
||||
permission_overwrites: {
|
||||
allow: bigint;
|
||||
deny: bigint;
|
||||
@ -17,3 +26,23 @@ export interface Channel {
|
||||
type: number;
|
||||
}[];
|
||||
}
|
||||
export interface VoiceChannel extends GuildChannel {
|
||||
}
|
||||
export interface TextChannel extends GuildChannel, TextBasedChannel {
|
||||
nsfw: boolean;
|
||||
rate_limit_per_user: number;
|
||||
topic?: string;
|
||||
}
|
||||
export interface DMChannel extends Channel, TextBasedChannel {
|
||||
owner_id: bigint;
|
||||
recipients: bigint[];
|
||||
}
|
||||
export declare enum ChannelType {
|
||||
GUILD_TEXT = 0,
|
||||
DM = 1,
|
||||
GUILD_VOICE = 2,
|
||||
GROUP_DM = 3,
|
||||
GUILD_CATEGORY = 4,
|
||||
GUILD_NEWS = 5,
|
||||
GUILD_STORE = 6
|
||||
}
|
||||
|
11
dist/models/Channel.js
vendored
11
dist/models/Channel.js
vendored
@ -1,3 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChannelType = void 0;
|
||||
var ChannelType;
|
||||
(function (ChannelType) {
|
||||
ChannelType[ChannelType["GUILD_TEXT"] = 0] = "GUILD_TEXT";
|
||||
ChannelType[ChannelType["DM"] = 1] = "DM";
|
||||
ChannelType[ChannelType["GUILD_VOICE"] = 2] = "GUILD_VOICE";
|
||||
ChannelType[ChannelType["GROUP_DM"] = 3] = "GROUP_DM";
|
||||
ChannelType[ChannelType["GUILD_CATEGORY"] = 4] = "GUILD_CATEGORY";
|
||||
ChannelType[ChannelType["GUILD_NEWS"] = 5] = "GUILD_NEWS";
|
||||
ChannelType[ChannelType["GUILD_STORE"] = 6] = "GUILD_STORE";
|
||||
})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
|
||||
//# sourceMappingURL=Channel.js.map
|
2
dist/models/Channel.js.map
vendored
2
dist/models/Channel.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../src/models/Channel.ts"],"names":[],"mappings":""}
|
||||
{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../src/models/Channel.ts"],"names":[],"mappings":";;;AA6CA,IAAY,WAQX;AARD,WAAY,WAAW;IACtB,yDAAc,CAAA;IACd,yCAAM,CAAA;IACN,2DAAe,CAAA;IACf,qDAAY,CAAA;IACZ,iEAAkB,CAAA;IAClB,yDAAc,CAAA;IACd,2DAAe,CAAA;AAChB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB"}
|
6
dist/models/Guild.d.ts
vendored
6
dist/models/Guild.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import { Channel } from "./Channel";
|
||||
import { GuildChannel } from "./Channel";
|
||||
import { Emoji } from "./Emoji";
|
||||
import { Member } from "./Member";
|
||||
import { Role } from "./Role";
|
||||
@ -7,13 +7,13 @@ export interface Guild {
|
||||
afk_timeout?: number;
|
||||
application_id?: bigint;
|
||||
banner?: string;
|
||||
channels: Channel[];
|
||||
channels: GuildChannel[];
|
||||
default_message_notifications?: number;
|
||||
description?: string;
|
||||
discovery_splash?: string;
|
||||
emojis: Emoji[];
|
||||
explicit_content_filter?: number;
|
||||
features: [];
|
||||
features: string[];
|
||||
icon?: string;
|
||||
id: bigint;
|
||||
large?: boolean;
|
||||
|
28
dist/models/Interaction.d.ts
vendored
Normal file
28
dist/models/Interaction.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import { AllowedMentions, Embed } from "./Message";
|
||||
export interface Interaction {
|
||||
id: bigint;
|
||||
type: InteractionType;
|
||||
data?: {};
|
||||
guild_id: bigint;
|
||||
channel_id: bigint;
|
||||
member_id: bigint;
|
||||
token: string;
|
||||
version: number;
|
||||
}
|
||||
export declare enum InteractionType {
|
||||
Ping = 1,
|
||||
ApplicationCommand = 2
|
||||
}
|
||||
export declare enum InteractionResponseType {
|
||||
Pong = 1,
|
||||
Acknowledge = 2,
|
||||
ChannelMessage = 3,
|
||||
ChannelMessageWithSource = 4,
|
||||
AcknowledgeWithSource = 5
|
||||
}
|
||||
export interface InteractionApplicationCommandCallbackData {
|
||||
tts?: boolean;
|
||||
content: string;
|
||||
embeds?: Embed[];
|
||||
allowed_mentions?: AllowedMentions;
|
||||
}
|
17
dist/models/Interaction.js
vendored
Normal file
17
dist/models/Interaction.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InteractionResponseType = exports.InteractionType = void 0;
|
||||
var InteractionType;
|
||||
(function (InteractionType) {
|
||||
InteractionType[InteractionType["Ping"] = 1] = "Ping";
|
||||
InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand";
|
||||
})(InteractionType = exports.InteractionType || (exports.InteractionType = {}));
|
||||
var InteractionResponseType;
|
||||
(function (InteractionResponseType) {
|
||||
InteractionResponseType[InteractionResponseType["Pong"] = 1] = "Pong";
|
||||
InteractionResponseType[InteractionResponseType["Acknowledge"] = 2] = "Acknowledge";
|
||||
InteractionResponseType[InteractionResponseType["ChannelMessage"] = 3] = "ChannelMessage";
|
||||
InteractionResponseType[InteractionResponseType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
|
||||
InteractionResponseType[InteractionResponseType["AcknowledgeWithSource"] = 5] = "AcknowledgeWithSource";
|
||||
})(InteractionResponseType = exports.InteractionResponseType || (exports.InteractionResponseType = {}));
|
||||
//# sourceMappingURL=Interaction.js.map
|
1
dist/models/Interaction.js.map
vendored
Normal file
1
dist/models/Interaction.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Interaction.js","sourceRoot":"","sources":["../../src/models/Interaction.ts"],"names":[],"mappings":";;;AAaA,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAsB,CAAA;AACvB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAED,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAClC,qEAAQ,CAAA;IACR,mFAAe,CAAA;IACf,yFAAkB,CAAA;IAClB,6GAA4B,CAAA;IAC5B,uGAAyB,CAAA;AAC1B,CAAC,EANW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAMlC"}
|
5
dist/models/Invite.d.ts
vendored
5
dist/models/Invite.d.ts
vendored
@ -1,5 +1,10 @@
|
||||
export interface Invite {
|
||||
code: string;
|
||||
temporary: boolean;
|
||||
uses: number;
|
||||
max_uses: number;
|
||||
max_age: number;
|
||||
created_at: number;
|
||||
guild: {
|
||||
id: bigint;
|
||||
name: string;
|
||||
|
24
dist/models/Member.d.ts
vendored
24
dist/models/Member.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
import { PublicUser } from "./User";
|
||||
export interface Member {
|
||||
id: bigint;
|
||||
nick?: string;
|
||||
@ -8,4 +9,27 @@ export interface Member {
|
||||
mute: boolean;
|
||||
pending: boolean;
|
||||
permissions: bigint;
|
||||
settings: UserGuildSettings;
|
||||
}
|
||||
export interface PublicMember extends Omit<Member, "settings" | "id"> {
|
||||
user: PublicUser;
|
||||
}
|
||||
export interface UserGuildSettings {
|
||||
channel_overrides: {
|
||||
channel_id: bigint;
|
||||
message_notifications: number;
|
||||
mute_config: MuteConfig;
|
||||
muted: boolean;
|
||||
}[];
|
||||
message_notifications: number;
|
||||
mobile_push: boolean;
|
||||
mute_config: MuteConfig;
|
||||
muted: boolean;
|
||||
suppress_everyone: boolean;
|
||||
suppress_roles: boolean;
|
||||
version: number;
|
||||
}
|
||||
export interface MuteConfig {
|
||||
end_time: number;
|
||||
selected_time_window: number;
|
||||
}
|
||||
|
117
dist/models/Message.d.ts
vendored
Normal file
117
dist/models/Message.d.ts
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
import { ChannelType } from "./Channel";
|
||||
export interface Message {
|
||||
id: bigint;
|
||||
author_id?: bigint;
|
||||
webhook_id?: bigint;
|
||||
application_id: bigint;
|
||||
content: string;
|
||||
timestamp: number;
|
||||
edited_timestamp: number;
|
||||
tts: boolean;
|
||||
mention_everyone: boolean;
|
||||
mentions: bigint[];
|
||||
mention_roles: bigint[];
|
||||
mention_channels?: {
|
||||
id: bigint;
|
||||
guild_id: bigint;
|
||||
type: ChannelType;
|
||||
name: string;
|
||||
}[];
|
||||
attachments: Attachment[];
|
||||
embeds: Embed[];
|
||||
reactions?: Reaction[];
|
||||
nonce?: string | number;
|
||||
pinned: boolean;
|
||||
type: MessageType;
|
||||
activity?: {
|
||||
type: number;
|
||||
party_id: string;
|
||||
}[];
|
||||
flags?: bigint;
|
||||
stickers?: [];
|
||||
message_reference?: {
|
||||
message_id: bigint;
|
||||
channel_id?: bigint;
|
||||
guild_id?: bigint;
|
||||
};
|
||||
}
|
||||
export declare enum MessageType {
|
||||
DEFAULT = 0,
|
||||
RECIPIENT_ADD = 1,
|
||||
RECIPIENT_REMOVE = 2,
|
||||
CALL = 3,
|
||||
CHANNEL_NAME_CHANGE = 4,
|
||||
CHANNEL_ICON_CHANGE = 5,
|
||||
CHANNEL_PINNED_MESSAGE = 6,
|
||||
GUILD_MEMBER_JOIN = 7,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
|
||||
CHANNEL_FOLLOW_ADD = 12,
|
||||
GUILD_DISCOVERY_DISQUALIFIED = 14,
|
||||
GUILD_DISCOVERY_REQUALIFIED = 15,
|
||||
REPLY = 19,
|
||||
APPLICATION_COMMAND = 20
|
||||
}
|
||||
export interface Attachment {
|
||||
id: bigint;
|
||||
filename: string;
|
||||
size: number;
|
||||
url: string;
|
||||
proxy_url: string;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
export interface Embed {
|
||||
title?: string;
|
||||
type?: string;
|
||||
description?: string;
|
||||
url?: string;
|
||||
timestamp?: number;
|
||||
color?: number;
|
||||
footer?: {
|
||||
text: string;
|
||||
icon_url?: string;
|
||||
proxy_icon_url?: string;
|
||||
};
|
||||
image?: EmbedImage;
|
||||
thumbnail?: EmbedImage;
|
||||
video?: EmbedImage;
|
||||
provider?: {
|
||||
name?: string;
|
||||
url?: string;
|
||||
};
|
||||
author?: {
|
||||
name?: string;
|
||||
url?: string;
|
||||
icon_url?: string;
|
||||
proxy_icon_url?: string;
|
||||
};
|
||||
fields?: {
|
||||
name: string;
|
||||
value: string;
|
||||
inline?: boolean;
|
||||
}[];
|
||||
}
|
||||
export interface EmbedImage {
|
||||
url?: string;
|
||||
proxy_url?: string;
|
||||
height?: number;
|
||||
width?: number;
|
||||
}
|
||||
export interface Reaction {
|
||||
count: number;
|
||||
emoji: PartialEmoji;
|
||||
}
|
||||
export interface PartialEmoji {
|
||||
id?: bigint;
|
||||
name: string;
|
||||
animated?: boolean;
|
||||
}
|
||||
export interface AllowedMentions {
|
||||
parse?: ("users" | "roles" | "everyone")[];
|
||||
roles?: bigint[];
|
||||
users?: bigint[];
|
||||
replied_user?: boolean;
|
||||
}
|
24
dist/models/Message.js
vendored
Normal file
24
dist/models/Message.js
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MessageType = void 0;
|
||||
var MessageType;
|
||||
(function (MessageType) {
|
||||
MessageType[MessageType["DEFAULT"] = 0] = "DEFAULT";
|
||||
MessageType[MessageType["RECIPIENT_ADD"] = 1] = "RECIPIENT_ADD";
|
||||
MessageType[MessageType["RECIPIENT_REMOVE"] = 2] = "RECIPIENT_REMOVE";
|
||||
MessageType[MessageType["CALL"] = 3] = "CALL";
|
||||
MessageType[MessageType["CHANNEL_NAME_CHANGE"] = 4] = "CHANNEL_NAME_CHANGE";
|
||||
MessageType[MessageType["CHANNEL_ICON_CHANGE"] = 5] = "CHANNEL_ICON_CHANGE";
|
||||
MessageType[MessageType["CHANNEL_PINNED_MESSAGE"] = 6] = "CHANNEL_PINNED_MESSAGE";
|
||||
MessageType[MessageType["GUILD_MEMBER_JOIN"] = 7] = "GUILD_MEMBER_JOIN";
|
||||
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION"] = 8] = "USER_PREMIUM_GUILD_SUBSCRIPTION";
|
||||
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1"] = 9] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1";
|
||||
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2"] = 10] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2";
|
||||
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3"] = 11] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3";
|
||||
MessageType[MessageType["CHANNEL_FOLLOW_ADD"] = 12] = "CHANNEL_FOLLOW_ADD";
|
||||
MessageType[MessageType["GUILD_DISCOVERY_DISQUALIFIED"] = 14] = "GUILD_DISCOVERY_DISQUALIFIED";
|
||||
MessageType[MessageType["GUILD_DISCOVERY_REQUALIFIED"] = 15] = "GUILD_DISCOVERY_REQUALIFIED";
|
||||
MessageType[MessageType["REPLY"] = 19] = "REPLY";
|
||||
MessageType[MessageType["APPLICATION_COMMAND"] = 20] = "APPLICATION_COMMAND";
|
||||
})(MessageType = exports.MessageType || (exports.MessageType = {}));
|
||||
//# sourceMappingURL=Message.js.map
|
1
dist/models/Message.js.map
vendored
Normal file
1
dist/models/Message.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../src/models/Message.ts"],"names":[],"mappings":";;;AAuCA,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,+DAAiB,CAAA;IACjB,qEAAoB,CAAA;IACpB,6CAAQ,CAAA;IACR,2EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,iFAA0B,CAAA;IAC1B,uEAAqB,CAAA;IACrB,mGAAmC,CAAA;IACnC,iHAA0C,CAAA;IAC1C,kHAA2C,CAAA;IAC3C,kHAA2C,CAAA;IAC3C,0EAAuB,CAAA;IACvB,8FAAiC,CAAA;IACjC,4FAAgC,CAAA;IAChC,gDAAU,CAAA;IACV,4EAAwB,CAAA;AACzB,CAAC,EAlBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkBtB"}
|
6
dist/models/Status.d.ts
vendored
Normal file
6
dist/models/Status.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export declare type Status = "idle" | "dnd" | "online" | "offline";
|
||||
export interface ClientStatus {
|
||||
desktop?: string;
|
||||
mobile?: string;
|
||||
web?: string;
|
||||
}
|
3
dist/models/Status.js
vendored
Normal file
3
dist/models/Status.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=Status.js.map
|
1
dist/models/Status.js.map
vendored
Normal file
1
dist/models/Status.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Status.js","sourceRoot":"","sources":["../../src/models/Status.ts"],"names":[],"mappings":""}
|
35
dist/models/User.d.ts
vendored
35
dist/models/User.d.ts
vendored
@ -3,17 +3,50 @@ export interface User {
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
phone?: string;
|
||||
desktop: boolean;
|
||||
mobile: boolean;
|
||||
premium: boolean;
|
||||
premium_type: number;
|
||||
bot: boolean;
|
||||
system: boolean;
|
||||
nsfw_allowed: boolean;
|
||||
mfa_enabled: boolean;
|
||||
created_at: number;
|
||||
verified: boolean;
|
||||
email: string;
|
||||
flags: bigint;
|
||||
public_flags: bigint;
|
||||
hash: string;
|
||||
guilds: bigint[];
|
||||
valid_tokens_since: number;
|
||||
user_settings: UserSettings;
|
||||
guilds: bigint[];
|
||||
relationships: Relationship[];
|
||||
connected_accounts: ConnectedAccount[];
|
||||
}
|
||||
export interface PublicUser {
|
||||
id: bigint;
|
||||
discriminator: string;
|
||||
username: string;
|
||||
avatar?: string;
|
||||
publicFlags: bigint;
|
||||
}
|
||||
export interface ConnectedAccount {
|
||||
access_token: string;
|
||||
friend_sync: boolean;
|
||||
id: string;
|
||||
name: string;
|
||||
revoked: boolean;
|
||||
show_activity: boolean;
|
||||
type: string;
|
||||
verifie: boolean;
|
||||
visibility: number;
|
||||
}
|
||||
export interface Relationship {
|
||||
id: bigint;
|
||||
nickname?: string;
|
||||
type: number;
|
||||
user_id: bigint;
|
||||
}
|
||||
export interface UserSettings {
|
||||
afk_timeout: number;
|
||||
|
13
dist/models/VoiceState.d.ts
vendored
Normal file
13
dist/models/VoiceState.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
export interface VoiceState {
|
||||
guild_id?: bigint;
|
||||
channel_id: bigint;
|
||||
user_id: bigint;
|
||||
session_id: string;
|
||||
deaf: boolean;
|
||||
mute: boolean;
|
||||
self_deaf: boolean;
|
||||
self_mute: boolean;
|
||||
self_stream?: boolean;
|
||||
self_video: boolean;
|
||||
suppress: boolean;
|
||||
}
|
3
dist/models/VoiceState.js
vendored
Normal file
3
dist/models/VoiceState.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=VoiceState.js.map
|
1
dist/models/VoiceState.js.map
vendored
Normal file
1
dist/models/VoiceState.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"VoiceState.js","sourceRoot":"","sources":["../../src/models/VoiceState.ts"],"names":[],"mappings":""}
|
Loading…
x
Reference in New Issue
Block a user