(key: string, defaultArg?: boolean)
| 217 | } |
| 218 | |
| 219 | getOptionUser(key: string, defaultArg?: boolean): User | undefined { |
| 220 | if (this.type === "classic") { |
| 221 | const id = defaultArg ? this.args.join(" ").trim() : this.options?.[key]; |
| 222 | return this.client.users.get(id as string); |
| 223 | } |
| 224 | if (this.type === "application") { |
| 225 | return this.interaction?.data.options.getUser(key); |
| 226 | } |
| 227 | throw Error("Unknown command type"); |
| 228 | } |
| 229 | |
| 230 | getOptionMember(key: string, defaultArg?: boolean): Member | undefined { |
| 231 | if (this.type === "classic") { |