(key: string)
| 251 | |
| 252 | // Note: the key is unused in a classic command context. |
| 253 | getOptionAttachment(key: string): Attachment | undefined { |
| 254 | if (this.type === "classic") { |
| 255 | return this.message?.attachments.first(); |
| 256 | } |
| 257 | if (this.type === "application") { |
| 258 | return this.interaction?.data.options.getAttachment(key); |
| 259 | } |
| 260 | throw Error("Unknown command type"); |
| 261 | } |
| 262 | |
| 263 | clean(text: string) { |
| 264 | if (this.message) { |