(key: string, defaultArg?: boolean)
| 207 | } |
| 208 | |
| 209 | getOptionInteger(key: string, defaultArg?: boolean): number | undefined { |
| 210 | if (this.type === "classic") { |
| 211 | return Number.parseInt((defaultArg ? this.args.join(" ").trim() : this.options?.[key]) as string); |
| 212 | } |
| 213 | if (this.type === "application") { |
| 214 | return this.interaction?.data.options.getInteger(key); |
| 215 | } |
| 216 | throw Error("Unknown command type"); |
| 217 | } |
| 218 | |
| 219 | getOptionUser(key: string, defaultArg?: boolean): User | undefined { |
| 220 | if (this.type === "classic") { |
no test coverage detected