fix
This commit is contained in:
parent
c2e7916aa3
commit
0edc74b1db
3 changed files with 8 additions and 8 deletions
|
@ -232,7 +232,7 @@ export class TextChannel extends Channel {
|
||||||
|
|
||||||
/** Trigger the typing indicator. NOT recommended to be used by bots unless you really want to. */
|
/** Trigger the typing indicator. NOT recommended to be used by bots unless you really want to. */
|
||||||
async triggerTyping(): Promise<TextChannel> {
|
async triggerTyping(): Promise<TextChannel> {
|
||||||
await this.client.rest.api.channels[this.id].typing.psot()
|
await this.client.rest.api.channels[this.id].typing.post()
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ export class GuildTextChannel extends TextChannel {
|
||||||
parent_id: options?.parentID,
|
parent_id: options?.parentID,
|
||||||
nsfw: options?.nsfw,
|
nsfw: options?.nsfw,
|
||||||
topic: options?.topic,
|
topic: options?.topic,
|
||||||
rate_limit_per_user: options?.rateLimitPerUser
|
rate_limit_per_user: options?.slowmode
|
||||||
}
|
}
|
||||||
|
|
||||||
const resp = await this.client.rest.patch(CHANNEL(this.id), body)
|
const resp = await this.client.rest.patch(CHANNEL(this.id), body)
|
||||||
|
@ -419,7 +419,7 @@ export class GuildTextChannel extends TextChannel {
|
||||||
|
|
||||||
/** Edit Slowmode of the channel */
|
/** Edit Slowmode of the channel */
|
||||||
async setSlowmode(slowmode?: number | null): Promise<GuildTextChannel> {
|
async setSlowmode(slowmode?: number | null): Promise<GuildTextChannel> {
|
||||||
return await this.edit({ rateLimitPerUser: slowmode ?? null })
|
return await this.edit({ slowmode: slowmode ?? null })
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Edit NSFW property of the channel */
|
/** Edit NSFW property of the channel */
|
||||||
|
|
|
@ -97,7 +97,7 @@ export interface ModifyGuildTextChannelOption extends ModifyChannelOption {
|
||||||
type?: number
|
type?: number
|
||||||
topic?: string | null
|
topic?: string | null
|
||||||
nsfw?: boolean | null
|
nsfw?: boolean | null
|
||||||
rateLimitPerUser?: number | null
|
slowmode?: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModifyGuildNewsChannelOption extends ModifyChannelOption {
|
export interface ModifyGuildNewsChannelOption extends ModifyChannelOption {
|
||||||
|
|
|
@ -11,19 +11,19 @@ export class Snowflake {
|
||||||
}
|
}
|
||||||
|
|
||||||
get timestamp(): number {
|
get timestamp(): number {
|
||||||
return Number(((this.snowflake >> 22n) + 1420070400000n).toString())
|
return Number((this.snowflake >> 22n) + 1420070400000n)
|
||||||
}
|
}
|
||||||
|
|
||||||
get workerID(): number {
|
get workerID(): number {
|
||||||
return Number(((this.snowflake & 0x3e0000n) >> 17n).toString())
|
return Number((this.snowflake & 0x3e0000n) >> 17n)
|
||||||
}
|
}
|
||||||
|
|
||||||
get processID(): number {
|
get processID(): number {
|
||||||
return Number(((this.snowflake & 0x1f00n) >> 12n).toString())
|
return Number((this.snowflake & 0x1f00n) >> 12n)
|
||||||
}
|
}
|
||||||
|
|
||||||
get increment(): number {
|
get increment(): number {
|
||||||
return Number((this.snowflake & 0xfffn).toString())
|
return Number(this.snowflake & 0xfffn)
|
||||||
}
|
}
|
||||||
|
|
||||||
get toString(): string {
|
get toString(): string {
|
||||||
|
|
Loading…
Reference in a new issue