x
This commit is contained in:
parent
004bf22126
commit
0692276f3a
2 changed files with 12 additions and 7 deletions
3
mod.ts
3
mod.ts
|
@ -46,7 +46,8 @@ export { UsersManager } from './src/managers/users.ts'
|
|||
export { InviteManager } from './src/managers/invites.ts'
|
||||
export { Application } from './src/structures/application.ts'
|
||||
// export { ImageURL } from './src/structures/cdn.ts'
|
||||
export { Channel } from './src/structures/channel.ts'
|
||||
export { Channel, GuildChannel } from './src/structures/channel.ts'
|
||||
export type { EditOverwriteOptions } from './src/structures/channel.ts'
|
||||
export { DMChannel } from './src/structures/dmChannel.ts'
|
||||
export { Embed } from './src/structures/embed.ts'
|
||||
export { Emoji } from './src/structures/emoji.ts'
|
||||
|
|
|
@ -38,6 +38,13 @@ export class Channel extends SnowflakeBase {
|
|||
}
|
||||
}
|
||||
|
||||
export interface EditOverwriteOptions {
|
||||
/** Allow Override Type */
|
||||
allow?: OverrideType
|
||||
/** Deny Override Type */
|
||||
deny?: OverrideType
|
||||
}
|
||||
|
||||
export class GuildChannel extends Channel {
|
||||
guildID: string
|
||||
name: string
|
||||
|
@ -257,12 +264,9 @@ export class GuildChannel extends Channel {
|
|||
async editOverwrite(
|
||||
overwrite: OverwriteAsArg,
|
||||
{
|
||||
overwriteAllow = OverrideType.ADD,
|
||||
overwriteDeny = OverrideType.ADD
|
||||
}: {
|
||||
overwriteAllow?: OverrideType
|
||||
overwriteDeny?: OverrideType
|
||||
}
|
||||
allow: overwriteAllow = OverrideType.ADD,
|
||||
deny: overwriteDeny = OverrideType.ADD
|
||||
}: EditOverwriteOptions
|
||||
): Promise<GuildChannels> {
|
||||
const id = typeof overwrite.id === 'string' ? overwrite.id : overwrite.id.id
|
||||
const index = this.permissionOverwrites.findIndex((e) => e.id === id)
|
||||
|
|
Loading…
Reference in a new issue