mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Fix formatting (deno fmt)
This commit is contained in:
@@ -33,7 +33,7 @@ const baseChannel: Partial<DiscordenoChannel> = {
|
||||
},
|
||||
get voiceStates() {
|
||||
return this.guild?.voiceStates.filter(
|
||||
(voiceState) => voiceState.channelId === this.id
|
||||
(voiceState) => voiceState.channelId === this.id,
|
||||
);
|
||||
},
|
||||
get connectedMembers() {
|
||||
@@ -41,7 +41,7 @@ const baseChannel: Partial<DiscordenoChannel> = {
|
||||
if (!voiceStates) return undefined;
|
||||
|
||||
return new Collection(
|
||||
voiceStates.map((vs, key) => [key, cache.members.get(key)])
|
||||
voiceStates.map((vs, key) => [key, cache.members.get(key)]),
|
||||
);
|
||||
},
|
||||
send(content) {
|
||||
@@ -64,7 +64,7 @@ const baseChannel: Partial<DiscordenoChannel> = {
|
||||
this.guildId!,
|
||||
this.id!,
|
||||
overwrites,
|
||||
permissions
|
||||
permissions,
|
||||
);
|
||||
},
|
||||
edit(options, reason) {
|
||||
@@ -79,7 +79,7 @@ const baseChannel: Partial<DiscordenoChannel> = {
|
||||
// deno-lint-ignore require-await
|
||||
export async function createDiscordenoChannel(
|
||||
data: DiscordChannel,
|
||||
guildId?: string
|
||||
guildId?: string,
|
||||
) {
|
||||
const {
|
||||
guildId: rawGuildId = "",
|
||||
@@ -91,7 +91,7 @@ export async function createDiscordenoChannel(
|
||||
Object.keys(rest).forEach((key) => {
|
||||
eventHandlers.debug?.(
|
||||
"loop",
|
||||
`Running forEach loop in createDiscordenoChannel function.`
|
||||
`Running forEach loop in createDiscordenoChannel function.`,
|
||||
);
|
||||
// @ts-ignore index signature
|
||||
props[key] = createNewProp(rest[key]);
|
||||
@@ -101,7 +101,7 @@ export async function createDiscordenoChannel(
|
||||
...props,
|
||||
guildId: createNewProp(guildId || rawGuildId),
|
||||
lastPinTimestamp: createNewProp(
|
||||
lastPinTimestamp ? Date.parse(lastPinTimestamp) : undefined
|
||||
lastPinTimestamp ? Date.parse(lastPinTimestamp) : undefined,
|
||||
),
|
||||
});
|
||||
|
||||
@@ -152,16 +152,16 @@ export interface DiscordenoChannel
|
||||
/** Edit a channel Overwrite */
|
||||
editOverwrite(
|
||||
overwriteID: string,
|
||||
options: Omit<Overwrite, "id">
|
||||
options: Omit<Overwrite, "id">,
|
||||
): ReturnType<typeof editChannelOverwrite>;
|
||||
/** Delete a channel Overwrite */
|
||||
deleteOverwrite(
|
||||
overwriteID: string
|
||||
overwriteID: string,
|
||||
): ReturnType<typeof deleteChannelOverwrite>;
|
||||
/** Checks if a channel overwrite for a user id or a role id has permission in this channel */
|
||||
hasPermission(
|
||||
overwrites: DiscordOverwrite[],
|
||||
permissions: PermissionStrings[]
|
||||
permissions: PermissionStrings[],
|
||||
): ReturnType<typeof channelOverwriteHasPermission>;
|
||||
/** Edit the channel */
|
||||
edit(options: ModifyChannel, reason?: string): ReturnType<typeof editChannel>;
|
||||
|
||||
Reference in New Issue
Block a user