style: format (#2925)

This commit is contained in:
ITOH
2023-04-01 02:46:46 +02:00
committed by GitHub
parent 4d3a2f7665
commit 05fc3fbeba
85 changed files with 670 additions and 828 deletions
+12 -12
View File
@@ -1,12 +1,12 @@
export * from "./CHANNEL_CREATE.js";
export * from "./CHANNEL_DELETE.js";
export * from "./CHANNEL_PINS_UPDATE.js";
export * from "./CHANNEL_UPDATE.js";
export * from "./STAGE_INSTANCE_CREATE.js";
export * from "./STAGE_INSTANCE_DELETE.js";
export * from "./STAGE_INSTANCE_UPDATE.js";
export * from "./THREAD_CREATE.js";
export * from "./THREAD_DELETE.js";
export * from "./THREAD_LIST_SYNC.js";
export * from "./THREAD_MEMBERS_UPDATE.js";
export * from "./THREAD_UPDATE.js";
export * from './CHANNEL_CREATE.js'
export * from './CHANNEL_DELETE.js'
export * from './CHANNEL_PINS_UPDATE.js'
export * from './CHANNEL_UPDATE.js'
export * from './STAGE_INSTANCE_CREATE.js'
export * from './STAGE_INSTANCE_DELETE.js'
export * from './STAGE_INSTANCE_UPDATE.js'
export * from './THREAD_CREATE.js'
export * from './THREAD_DELETE.js'
export * from './THREAD_LIST_SYNC.js'
export * from './THREAD_MEMBERS_UPDATE.js'
export * from './THREAD_UPDATE.js'
+1 -1
View File
@@ -1 +1 @@
export * from "./GUILD_EMOJIS_UPDATE.js";
export * from './GUILD_EMOJIS_UPDATE.js'
@@ -5,8 +5,8 @@ export async function handleGuildStickersUpdate(bot: Bot, data: DiscordGatewayPa
bot.events.guildStickersUpdate?.(
payload.stickers.map((sticker) => {
sticker.guild_id = payload.guild_id
return bot.transformers.sticker(bot, sticker)
})
sticker.guild_id = payload.guild_id
return bot.transformers.sticker(bot, sticker)
}),
)
}
+10 -10
View File
@@ -1,11 +1,11 @@
export * from "./automod/index.js";
export * from "./scheduledEvents/index.js";
export * from './automod/index.js'
export * from './scheduledEvents/index.js'
export * from "./GUILD_AUDIT_LOG_ENTRY_CREATE.js";
export * from "./GUILD_BAN_ADD.js";
export * from "./GUILD_BAN_REMOVE.js";
export * from "./GUILD_CREATE.js";
export * from "./GUILD_DELETE.js";
export * from "./GUILD_INTEGRATIONS_UPDATE.js";
export * from "./GUILD_STICKERS_UPDATE.js";
export * from "./GUILD_UPDATE.js";
export * from './GUILD_AUDIT_LOG_ENTRY_CREATE.js'
export * from './GUILD_BAN_ADD.js'
export * from './GUILD_BAN_REMOVE.js'
export * from './GUILD_CREATE.js'
export * from './GUILD_DELETE.js'
export * from './GUILD_INTEGRATIONS_UPDATE.js'
export * from './GUILD_STICKERS_UPDATE.js'
export * from './GUILD_UPDATE.js'
@@ -1,5 +1,5 @@
export * from "./GUILD_SCHEDULED_EVENT_CREATE.js";
export * from "./GUILD_SCHEDULED_EVENT_DELETE.js";
export * from "./GUILD_SCHEDULED_EVENT_UPDATE.js";
export * from "./GUILD_SCHEDULED_EVENT_USER_ADD.js";
export * from "./GUILD_SCHEDULED_EVENT_USER_REMOVE.js";
export * from './GUILD_SCHEDULED_EVENT_CREATE.js'
export * from './GUILD_SCHEDULED_EVENT_DELETE.js'
export * from './GUILD_SCHEDULED_EVENT_UPDATE.js'
export * from './GUILD_SCHEDULED_EVENT_USER_ADD.js'
export * from './GUILD_SCHEDULED_EVENT_USER_REMOVE.js'
@@ -1,3 +1,3 @@
export * from "./INTEGRATION_CREATE.js";
export * from "./INTEGRATION_DELETE.js";
export * from "./INTEGRATION_UPDATE.js";
export * from './INTEGRATION_CREATE.js'
export * from './INTEGRATION_DELETE.js'
export * from './INTEGRATION_UPDATE.js'
@@ -1,6 +1,6 @@
import type { Bot, DiscordGatewayPayload, DiscordGuildApplicationCommandPermissions } from "../..";
import type { Bot, DiscordGatewayPayload, DiscordGuildApplicationCommandPermissions } from '../..'
export async function handleApplicationCommandPermissionsUpdate(bot: Bot, data: DiscordGatewayPayload, shardId: number): Promise<void> {
const payload = data.d as DiscordGuildApplicationCommandPermissions
bot.events.applicationCommandPermissionsUpdate?.(bot.transformers.applicationCommandPermission(bot, payload))
}
const payload = data.d as DiscordGuildApplicationCommandPermissions
bot.events.applicationCommandPermissionsUpdate?.(bot.transformers.applicationCommandPermission(bot, payload))
}
+2 -2
View File
@@ -1,2 +1,2 @@
export * from "./INVITE_CREATE.js";
export * from "./INVITE_DELETE.js";
export * from './INVITE_CREATE.js'
export * from './INVITE_DELETE.js'
+4 -4
View File
@@ -1,4 +1,4 @@
export * from "./GUILD_MEMBER_ADD.js";
export * from "./GUILD_MEMBER_REMOVE.js";
export * from "./GUILD_MEMBER_UPDATE.js";
export * from "./GUILD_MEMBERS_CHUNK.js";
export * from './GUILD_MEMBER_ADD.js'
export * from './GUILD_MEMBER_REMOVE.js'
export * from './GUILD_MEMBER_UPDATE.js'
export * from './GUILD_MEMBERS_CHUNK.js'
+8 -8
View File
@@ -1,8 +1,8 @@
export * from "./MESSAGE_CREATE.js";
export * from "./MESSAGE_DELETE_BULK.js";
export * from "./MESSAGE_DELETE.js";
export * from "./MESSAGE_REACTION_ADD.js";
export * from "./MESSAGE_REACTION_REMOVE_ALL.js";
export * from "./MESSAGE_REACTION_REMOVE_EMOJI.js";
export * from "./MESSAGE_REACTION_REMOVE.js";
export * from "./MESSAGE_UPDATE.js";
export * from './MESSAGE_CREATE.js'
export * from './MESSAGE_DELETE_BULK.js'
export * from './MESSAGE_DELETE.js'
export * from './MESSAGE_REACTION_ADD.js'
export * from './MESSAGE_REACTION_REMOVE_ALL.js'
export * from './MESSAGE_REACTION_REMOVE_EMOJI.js'
export * from './MESSAGE_REACTION_REMOVE.js'
export * from './MESSAGE_UPDATE.js'
+4 -4
View File
@@ -1,4 +1,4 @@
export * from "./PRESENCE_UPDATE.js";
export * from "./READY.js";
export * from "./TYPING_START.js";
export * from "./USER_UPDATE.js";
export * from './PRESENCE_UPDATE.js'
export * from './READY.js'
export * from './TYPING_START.js'
export * from './USER_UPDATE.js'
+3 -3
View File
@@ -1,3 +1,3 @@
export * from "./GUILD_ROLE_CREATE.js";
export * from "./GUILD_ROLE_DELETE.js";
export * from "./GUILD_ROLE_UPDATE.js";
export * from './GUILD_ROLE_CREATE.js'
export * from './GUILD_ROLE_DELETE.js'
export * from './GUILD_ROLE_UPDATE.js'
+2 -2
View File
@@ -1,2 +1,2 @@
export * from "./VOICE_SERVER_UPDATE.js";
export * from "./VOICE_STATE_UPDATE.js";
export * from './VOICE_SERVER_UPDATE.js'
export * from './VOICE_STATE_UPDATE.js'
@@ -1,7 +1,7 @@
import type { DiscordGatewayPayload, DiscordWebhookUpdate } from '@discordeno/types'
import type { Bot } from '../../index.js'
export async function handleWebhooksUpdate(bot: Bot, data: DiscordGatewayPayload, shardId: number) : Promise<void> {
export async function handleWebhooksUpdate(bot: Bot, data: DiscordGatewayPayload, shardId: number): Promise<void> {
const payload = data.d as DiscordWebhookUpdate
bot.events.webhooksUpdate?.({
channelId: bot.transformers.snowflake(payload.channel_id),
+1 -1
View File
@@ -1 +1 @@
export * from "./WEBHOOKS_UPDATE.js";
export * from './WEBHOOKS_UPDATE.js'
+16 -16
View File
@@ -1,16 +1,16 @@
export * from "./activity.js";
export * from "./application.js";
export * from "./applicationCommand.js";
export * from "./applicationCommandOption.js";
export * from "./applicationCommandOptionChoice.js";
export * from "./applicationCommandPermission.js";
export * from "./attachment.js";
export * from "./auditLogEntry.js";
export * from "./component.js";
export * from "./embed.js";
export * from "./emoji.js";
export * from "./gatewayBot.js";
export * from "./member.js";
export * from "./presence.js";
export * from "./team.js";
export * from "./widgetSettings.js";
export * from './activity.js'
export * from './application.js'
export * from './applicationCommand.js'
export * from './applicationCommandOption.js'
export * from './applicationCommandOptionChoice.js'
export * from './applicationCommandPermission.js'
export * from './attachment.js'
export * from './auditLogEntry.js'
export * from './component.js'
export * from './embed.js'
export * from './emoji.js'
export * from './gatewayBot.js'
export * from './member.js'
export * from './presence.js'
export * from './team.js'
export * from './widgetSettings.js'
@@ -1,49 +1,49 @@
export class ToggleBitfield {
bitfield = 0;
bitfield = 0
constructor(bitfield?: number) {
if (bitfield) this.bitfield = bitfield;
if (bitfield) this.bitfield = bitfield
}
/** Tests whether or not this bitfield has the permission requested. */
contains(bits: number): boolean {
return Boolean(this.bitfield & bits);
return Boolean(this.bitfield & bits)
}
/** Adds some bits to the bitfield. */
add(bits: number): this {
this.bitfield |= bits;
return this;
this.bitfield |= bits
return this
}
/** Removes some bits from the bitfield. */
remove(bits: number): this {
this.bitfield &= ~bits;
return this;
this.bitfield &= ~bits
return this
}
}
export class ToggleBitfieldBigint {
bitfield = 0n;
bitfield = 0n
constructor(bitfield?: bigint) {
if (bitfield) this.bitfield = bitfield;
if (bitfield) this.bitfield = bitfield
}
/** Tests whether or not this bitfield has the permission requested. */
contains(bits: bigint): boolean {
return Boolean(this.bitfield & bits);
return Boolean(this.bitfield & bits)
}
/** Adds some bits to the bitfield. */
add(bits: bigint): this {
this.bitfield |= bits;
return this;
this.bitfield |= bits
return this
}
/** Removes some bits from the bitfield. */
remove(bits: bigint): this {
this.bitfield &= ~bits;
return this;
this.bitfield &= ~bits
return this
}
}
@@ -1,7 +1,7 @@
export * from "./emoji.js";
export * from "./guild.js";
export * from "./member.js";
export * from "./role.js";
export * from "./ToggleBitfield.js";
export * from "./user.js";
export * from "./voice.js";
export * from './emoji.js'
export * from './guild.js'
export * from './member.js'
export * from './role.js'
export * from './ToggleBitfield.js'
export * from './user.js'
export * from './voice.js'
+4 -12
View File
@@ -1,16 +1,8 @@
{
"extends": "tsconfig/base.json",
"compilerOptions": {
"outDir": "./dist",
"outDir": "./dist"
},
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
],
"exclude": [
"node_modules",
"dist",
"test",
"tests"
]
}
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["node_modules", "dist", "test", "tests"]
}
+3 -9
View File
@@ -1,11 +1,5 @@
{
"extends": "tsconfig/test.json",
"include": [
"tests",
],
"exclude": [
"node_modules",
"dist",
"src"
]
}
"include": ["tests"],
"exclude": ["node_modules", "dist", "src"]
}