fix
This commit is contained in:
parent
5b015c6c08
commit
c836ca8f42
|
@ -146,11 +146,11 @@ export class Interaction extends SnowflakeBase {
|
||||||
option<T>(name: string): T {
|
option<T>(name: string): T {
|
||||||
const op = this.options.find((e) => e.name === name)
|
const op = this.options.find((e) => e.name === name)
|
||||||
if (op === undefined || op.value === undefined) return undefined as any
|
if (op === undefined || op.value === undefined) return undefined as any
|
||||||
if (op.type === SlashCommandOptionType.USER)
|
if (op.type === SlashCommandOptionType.USER) {
|
||||||
const u: InteractionUser = this.resolved.users[op.value] as any
|
const u: InteractionUser = this.resolved.users[op.value] as any
|
||||||
if (this.resolved.members[op.value] !== undefined) u.member = this.resolved.members[op.value] as any
|
if (this.resolved.members[op.value] !== undefined) u.member = this.resolved.members[op.value] as any
|
||||||
return u
|
return u
|
||||||
else if (op.type === SlashCommandOptionType.ROLE)
|
} else if (op.type === SlashCommandOptionType.ROLE)
|
||||||
return this.resolved.roles[op.value] as any
|
return this.resolved.roles[op.value] as any
|
||||||
else if (op.type === SlashCommandOptionType.CHANNEL)
|
else if (op.type === SlashCommandOptionType.CHANNEL)
|
||||||
return this.resolved.channels[op.value] as any
|
return this.resolved.channels[op.value] as any
|
||||||
|
|
Loading…
Reference in New Issue