mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
lol
This commit is contained in:
commit
0bd9c27c4f
@ -46,7 +46,7 @@ import type { Interaction } from "./structures/interactions/InteractionFactory.t
|
||||
import { AutoModerationRule } from "./structures/AutoModerationRule.ts";
|
||||
import { AutoModerationExecution } from "./structures/AutoModerationExecution.ts";
|
||||
import { type Channel, ChannelFactory, GuildChannel, ThreadChannel } from "./structures/channels.ts";
|
||||
import { type DiscordStageInstance, StageInstance } from "./structures/StageInstance.ts";
|
||||
import { type DiscordStageInstanceB, StageInstance } from "./structures/StageInstance.ts";
|
||||
import { ScheduledEvent } from "./structures/GuildScheduledEvent.ts";
|
||||
import { Presence } from "./structures/Presence.ts";
|
||||
|
||||
@ -55,7 +55,7 @@ import Member from "./structures/Member.ts";
|
||||
import Message from "./structures/Message.ts";
|
||||
import User from "./structures/User.ts";
|
||||
import Integration from "./structures/Integration.ts";
|
||||
import Guild from "./structures/guilds/Guild.ts";
|
||||
import { Guild } from "./structures/guilds.ts";
|
||||
import InteractionFactory from "./structures/interactions/InteractionFactory.ts";
|
||||
import { InviteCreate, NewInviteCreate } from "./structures/Invite.ts";
|
||||
import {
|
||||
@ -325,15 +325,15 @@ export const INVITE_DELETE: RawHandler<DiscordInviteDelete> = (session, _shardId
|
||||
session.emit("inviteDelete", { channelId: data.channel_id, guildId: data.guild_id, code: data.code });
|
||||
};
|
||||
|
||||
export const STAGE_INSTANCE_CREATE: RawHandler<DiscordStageInstance> = (session, _shardId, payload) => {
|
||||
export const STAGE_INSTANCE_CREATE: RawHandler<DiscordStageInstanceB> = (session, _shardId, payload) => {
|
||||
session.emit("stageInstanceCreate", new StageInstance(session, payload));
|
||||
};
|
||||
|
||||
export const STAGE_INSTANCE_UPDATE: RawHandler<DiscordStageInstance> = (session, _shardId, payload) => {
|
||||
export const STAGE_INSTANCE_UPDATE: RawHandler<DiscordStageInstanceB> = (session, _shardId, payload) => {
|
||||
session.emit("stageInstanceUpdate", new StageInstance(session, payload));
|
||||
};
|
||||
|
||||
export const STAGE_INSTANCE_DELETE: RawHandler<DiscordStageInstance> = (session, _shardId, payload) => {
|
||||
export const STAGE_INSTANCE_DELETE: RawHandler<DiscordStageInstanceB> = (session, _shardId, payload) => {
|
||||
session.emit("stageInstanceDelete", new StageInstance(session, payload));
|
||||
};
|
||||
|
||||
|
@ -39,10 +39,7 @@ export * from "./structures/components/SelectMenuComponent.ts";
|
||||
export * from "./structures/components/TextInputComponent.ts";
|
||||
|
||||
// guilds
|
||||
export * from "./structures/guilds/AnonymousGuild.ts";
|
||||
export * from "./structures/guilds/BaseGuild.ts";
|
||||
export * from "./structures/guilds/Guild.ts";
|
||||
export * from "./structures/guilds/InviteGuild.ts";
|
||||
export * from "./structures/guilds.ts";
|
||||
|
||||
// builders
|
||||
export * from "./structures/builders/EmbedBuilder.ts";
|
||||
|
@ -4,9 +4,9 @@ import type { Session } from "../Session.ts";
|
||||
import type { DiscordMemberWithUser } from "../../discordeno/mod.ts";
|
||||
import type { ImageFormat, ImageSize } from "../Util.ts";
|
||||
import type { CreateGuildBan, ModifyGuildMember } from "./guilds.ts";
|
||||
import { Guild } from "./guilds.ts";
|
||||
import Util from "../Util.ts";
|
||||
import User from "./User.ts";
|
||||
import Guild from "./guilds.ts";
|
||||
import * as Routes from "../Routes.ts";
|
||||
|
||||
/**
|
||||
|
@ -103,7 +103,6 @@ export class Message implements Model {
|
||||
this.reactions = data.reactions?.map((react) => new MessageReaction(session, react)) ?? [];
|
||||
this.attachments = data.attachments.map((attachment) => new Attachment(session, attachment));
|
||||
this.embeds = data.embeds;
|
||||
this.stickers = data.stickers?.map((sticker) => new Sticker(session, sticker)) ?? [];
|
||||
|
||||
if (data.thread && data.guild_id) {
|
||||
this.thread = new ThreadChannel(session, data.thread, data.guild_id);
|
||||
@ -162,6 +161,7 @@ export class Message implements Model {
|
||||
timestamp: number;
|
||||
editedTimestamp?: number;
|
||||
|
||||
/** @deprecated */
|
||||
stickers?: StickerItem[];
|
||||
reactions: MessageReaction[];
|
||||
attachments: Attachment[];
|
||||
@ -170,9 +170,6 @@ export class Message implements Model {
|
||||
thread?: ThreadChannel;
|
||||
components: Component[];
|
||||
|
||||
/** @deprecated */
|
||||
stickers: Sticker[];
|
||||
|
||||
webhook?: WebhookAuthor;
|
||||
activity?: {
|
||||
partyId?: Snowflake;
|
||||
|
@ -2,9 +2,9 @@ import type { Model } from "./Base.ts";
|
||||
import type { DiscordRole } from "../../discordeno/mod.ts";
|
||||
import type { Session } from "../Session.ts";
|
||||
import { Snowflake } from "../Snowflake.ts";
|
||||
import { Guild, type ModifyGuildRole } from "./guilds.ts";
|
||||
import Permissions from "./Permissions.ts";
|
||||
import Util from "../Util.ts";
|
||||
import { Guild, ModifyGuildRole } from "./guilds.ts";
|
||||
|
||||
export class Role implements Model {
|
||||
constructor(session: Session, data: DiscordRole, guildId: Snowflake) {
|
||||
|
@ -4,7 +4,7 @@ import type { Snowflake } from "../Snowflake.ts";
|
||||
import type { DiscordStageInstance as DiscordAutoClosingStageInstance } from "../../discordeno/mod.ts";
|
||||
import * as Routes from "../Routes.ts";
|
||||
|
||||
interface DiscordStageInstance extends DiscordAutoClosingStageInstance {
|
||||
export interface DiscordStageInstanceB extends DiscordAutoClosingStageInstance {
|
||||
privacy_level: PrivacyLevels;
|
||||
discoverable_disabled: boolean;
|
||||
guild_scheduled_event_id: Snowflake;
|
||||
@ -16,7 +16,7 @@ export enum PrivacyLevels {
|
||||
}
|
||||
|
||||
export class StageInstance implements Model {
|
||||
constructor(session: Session, data: DiscordStageInstance) {
|
||||
constructor(session: Session, data: DiscordStageInstanceB) {
|
||||
this.session = session;
|
||||
this.id = data.id;
|
||||
this.channelId = data.channel_id;
|
||||
@ -40,7 +40,7 @@ export class StageInstance implements Model {
|
||||
guildScheduledEventId: Snowflake;
|
||||
|
||||
async edit(options: { topic?: string; privacyLevel?: PrivacyLevels }) {
|
||||
const stageInstance = await this.session.rest.runMethod<DiscordStageInstance>(
|
||||
const stageInstance = await this.session.rest.runMethod<DiscordStageInstanceB>(
|
||||
this.session.rest,
|
||||
"PATCH",
|
||||
Routes.STAGE_INSTANCE(this.id),
|
||||
|
Loading…
x
Reference in New Issue
Block a user