This commit is contained in:
DjDeveloperr 2021-01-25 18:56:32 +05:30
parent c2e7916aa3
commit 0edc74b1db
3 changed files with 8 additions and 8 deletions

View File

@ -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. */
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
}
}
@ -294,7 +294,7 @@ export class GuildTextChannel extends TextChannel {
parent_id: options?.parentID,
nsfw: options?.nsfw,
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)
@ -419,7 +419,7 @@ export class GuildTextChannel extends TextChannel {
/** Edit Slowmode of the channel */
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 */

View File

@ -97,7 +97,7 @@ export interface ModifyGuildTextChannelOption extends ModifyChannelOption {
type?: number
topic?: string | null
nsfw?: boolean | null
rateLimitPerUser?: number | null
slowmode?: number | null
}
export interface ModifyGuildNewsChannelOption extends ModifyChannelOption {

View File

@ -11,19 +11,19 @@ export class Snowflake {
}
get timestamp(): number {
return Number(((this.snowflake >> 22n) + 1420070400000n).toString())
return Number((this.snowflake >> 22n) + 1420070400000n)
}
get workerID(): number {
return Number(((this.snowflake & 0x3e0000n) >> 17n).toString())
return Number((this.snowflake & 0x3e0000n) >> 17n)
}
get processID(): number {
return Number(((this.snowflake & 0x1f00n) >> 12n).toString())
return Number((this.snowflake & 0x1f00n) >> 12n)
}
get increment(): number {
return Number((this.snowflake & 0xfffn).toString())
return Number(this.snowflake & 0xfffn)
}
get toString(): string {