mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: fmt
This commit is contained in:
parent
c22ea0a767
commit
615470e723
@ -38,7 +38,7 @@ session.on("messageCreate", (message) => {
|
|||||||
if (name === "ping") {
|
if (name === "ping") {
|
||||||
message.reply({ components: [row] })
|
message.reply({ components: [row] })
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
.catch(e => console.error(e))
|
.catch((e) => console.error(e));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ const command: CreateApplicationCommand = {
|
|||||||
description: "Replies with pong!",
|
description: "Replies with pong!",
|
||||||
};
|
};
|
||||||
|
|
||||||
const guildId = '';
|
const guildId = "";
|
||||||
|
|
||||||
session.on("ready", async (payload) => {
|
session.on("ready", async (payload) => {
|
||||||
console.log("Logged in as:", payload.user.username);
|
console.log("Logged in as:", payload.user.username);
|
||||||
@ -40,4 +40,4 @@ session.on("interactionCreate", (interaction) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await session.start()
|
await session.start();
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import type {
|
import type {
|
||||||
StatusTypes,
|
|
||||||
ApplicationCommandPermissionTypes,
|
ApplicationCommandPermissionTypes,
|
||||||
AtLeastOne,
|
AtLeastOne,
|
||||||
DiscordApplicationCommand,
|
DiscordApplicationCommand,
|
||||||
DiscordApplicationCommandOption,
|
DiscordApplicationCommandOption,
|
||||||
DiscordGetGatewayBot,
|
DiscordGetGatewayBot,
|
||||||
DiscordGuildApplicationCommandPermissions,
|
DiscordGuildApplicationCommandPermissions,
|
||||||
|
DiscordUser,
|
||||||
GatewayBot,
|
GatewayBot,
|
||||||
GatewayIntents,
|
GatewayIntents,
|
||||||
Localization,
|
Localization,
|
||||||
DiscordUser,
|
StatusTypes,
|
||||||
} from "../discordeno/mod.ts";
|
} from "../discordeno/mod.ts";
|
||||||
|
|
||||||
import type { DiscordGatewayPayload, Shard } from "../discordeno/mod.ts";
|
import type { DiscordGatewayPayload, Shard } from "../discordeno/mod.ts";
|
||||||
@ -24,9 +24,9 @@ import {
|
|||||||
ApplicationCommandTypes,
|
ApplicationCommandTypes,
|
||||||
createGatewayManager,
|
createGatewayManager,
|
||||||
createRestManager,
|
createRestManager,
|
||||||
getBotIdFromToken,
|
|
||||||
GatewayOpcodes,
|
GatewayOpcodes,
|
||||||
StatusTypes
|
getBotIdFromToken,
|
||||||
|
StatusTypes,
|
||||||
} from "../discordeno/mod.ts";
|
} from "../discordeno/mod.ts";
|
||||||
|
|
||||||
import User from "./structures/User.ts";
|
import User from "./structures/User.ts";
|
||||||
@ -111,7 +111,7 @@ export interface SessionOptions {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @link https://discord.com/developers/docs/topics/gateway#update-status
|
* @link https://discord.com/developers/docs/topics/gateway#update-status
|
||||||
* */
|
*/
|
||||||
export interface StatusUpdate {
|
export interface StatusUpdate {
|
||||||
activities: Activities[];
|
activities: Activities[];
|
||||||
status: StatusTypes;
|
status: StatusTypes;
|
||||||
@ -209,7 +209,7 @@ export class Session extends EventEmitter {
|
|||||||
* for (const { id } of session.gateway.manager.shards) {
|
* for (const { id } of session.gateway.manager.shards) {
|
||||||
* session.editStatus(id, data);
|
* session.editStatus(id, data);
|
||||||
* }
|
* }
|
||||||
* */
|
*/
|
||||||
editStatus(shardId: number, status: StatusUpdate): void {
|
editStatus(shardId: number, status: StatusUpdate): void {
|
||||||
const shard = this.gateway.manager.shards.get(shardId);
|
const shard = this.gateway.manager.shards.get(shardId);
|
||||||
|
|
||||||
@ -236,15 +236,17 @@ export class Session extends EventEmitter {
|
|||||||
emoji: activity.emoji || {
|
emoji: activity.emoji || {
|
||||||
name: activity.emoji!.name,
|
name: activity.emoji!.name,
|
||||||
id: activity.emoji!.id,
|
id: activity.emoji!.id,
|
||||||
animated: activity.emoji!.animated
|
animated: activity.emoji!.animated,
|
||||||
},
|
},
|
||||||
party: activity.party,
|
party: activity.party,
|
||||||
assets: activity.assets ? {
|
assets: activity.assets
|
||||||
|
? {
|
||||||
large_image: activity.assets.largeImage,
|
large_image: activity.assets.largeImage,
|
||||||
large_text: activity.assets.largeText,
|
large_text: activity.assets.largeText,
|
||||||
small_image: activity.assets.smallImage,
|
small_image: activity.assets.smallImage,
|
||||||
small_text: activity.assets.smallText,
|
small_text: activity.assets.smallText,
|
||||||
} : undefined,
|
}
|
||||||
|
: undefined,
|
||||||
secrets: activity.secrets,
|
secrets: activity.secrets,
|
||||||
instance: activity.instance,
|
instance: activity.instance,
|
||||||
flags: activity.flags,
|
flags: activity.flags,
|
||||||
|
@ -7,7 +7,7 @@ import * as Routes from "../Routes.ts";
|
|||||||
/**
|
/**
|
||||||
* A member that comes from a thread
|
* A member that comes from a thread
|
||||||
* @link https://discord.com/developers/docs/resources/channel#thread-member-object
|
* @link https://discord.com/developers/docs/resources/channel#thread-member-object
|
||||||
* * */
|
* **/
|
||||||
export class ThreadMember implements Model {
|
export class ThreadMember implements Model {
|
||||||
constructor(session: Session, data: DiscordThreadMember) {
|
constructor(session: Session, data: DiscordThreadMember) {
|
||||||
this.session = session;
|
this.session = session;
|
||||||
|
@ -691,7 +691,8 @@ export class Guild extends BaseGuild implements Model {
|
|||||||
splash: "splashURL" in options
|
splash: "splashURL" in options
|
||||||
? options.splashURL || urlToBase64(options.splashURL!)
|
? options.splashURL || urlToBase64(options.splashURL!)
|
||||||
: options.splashHash || Util.iconBigintToHash(options.iconHash!),
|
: options.splashHash || Util.iconBigintToHash(options.iconHash!),
|
||||||
banner: "bannerURL" in options ? options.bannerURL || urlToBase64(options.bannerURL!)
|
banner: "bannerURL" in options
|
||||||
|
? options.bannerURL || urlToBase64(options.bannerURL!)
|
||||||
: options.bannerHash || Util.iconBigintToHash(options.bannerHash!),
|
: options.bannerHash || Util.iconBigintToHash(options.bannerHash!),
|
||||||
discovery_splash: "discoverySplashURL" in options
|
discovery_splash: "discoverySplashURL" in options
|
||||||
? options.discoverySplashURL || urlToBase64(options.discoverySplashURL!)
|
? options.discoverySplashURL || urlToBase64(options.discoverySplashURL!)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user