(key: string, defaultArg?: boolean)
| 197 | } |
| 198 | |
| 199 | getOptionNumber(key: string, defaultArg?: boolean): number | undefined { |
| 200 | if (this.type === "classic") { |
| 201 | return Number.parseFloat((defaultArg ? this.args.join(" ").trim() : this.options?.[key]) as string); |
| 202 | } |
| 203 | if (this.type === "application") { |
| 204 | return this.interaction?.data.options.getNumber(key); |
| 205 | } |
| 206 | throw Error("Unknown command type"); |
| 207 | } |
| 208 | |
| 209 | getOptionInteger(key: string, defaultArg?: boolean): number | undefined { |
| 210 | if (this.type === "classic") { |
no test coverage detected