initial update
This commit is contained in:
parent
3272429cf6
commit
db9b70bf66
280 changed files with 11772 additions and 11966 deletions
|
@ -1,23 +1,23 @@
|
|||
import Command from "../../classes/command.js";
|
||||
import imageDetect from "../../utils/imagedetect.js";
|
||||
import { selectedImages } from "../../utils/collections.js";
|
||||
|
||||
class SelectImageCommand extends Command {
|
||||
async run() {
|
||||
await this.acknowledge();
|
||||
const message = this.interaction.data.target;
|
||||
const image = await imageDetect(this.client, message, this.interaction, this.options, true, false, false, true);
|
||||
this.success = false;
|
||||
if (image === undefined) {
|
||||
return "I couldn't find an image in that message!";
|
||||
} else if (image.type === "large") {
|
||||
return "That image is too large (>= 25MB)! Try using a smaller image.";
|
||||
} else if (image.type === "tenorlimit") {
|
||||
return "I've been rate-limited by Tenor. Please try uploading your GIF elsewhere.";
|
||||
}
|
||||
selectedImages.set(this.author.id, image);
|
||||
return "The image has been selected for your next command.";
|
||||
}
|
||||
}
|
||||
|
||||
import Command from "../../classes/command.js";
|
||||
import imageDetect from "../../utils/imagedetect.js";
|
||||
import { selectedImages } from "../../utils/collections.js";
|
||||
|
||||
class SelectImageCommand extends Command {
|
||||
async run() {
|
||||
await this.acknowledge();
|
||||
const message = this.interaction.data.target;
|
||||
const image = await imageDetect(this.client, message, this.interaction, this.options, true, false, false, true);
|
||||
this.success = false;
|
||||
if (image === undefined) {
|
||||
return "I couldn't find an image in that message!";
|
||||
} else if (image.type === "large") {
|
||||
return "That image is too large (>= 25MB)! Try using a smaller image.";
|
||||
} else if (image.type === "tenorlimit") {
|
||||
return "I've been rate-limited by Tenor. Please try uploading your GIF elsewhere.";
|
||||
}
|
||||
selectedImages.set(this.author.id, image);
|
||||
return "The image has been selected for your next command.";
|
||||
}
|
||||
}
|
||||
|
||||
export default SelectImageCommand;
|
Loading…
Add table
Add a link
Reference in a new issue