2021-08-19 14:19:14 +00:00
|
|
|
import ImageCommand from "../../classes/imageCommand.js";
|
|
|
|
import { random } from "../../utils/misc.js";
|
2022-01-21 04:52:29 +00:00
|
|
|
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "pcmasterrace", "thomastheplankengine"];
|
2021-04-26 14:47:03 +00:00
|
|
|
|
|
|
|
class RedditCommand extends ImageCommand {
|
2022-03-31 19:53:22 +00:00
|
|
|
params(url) {
|
|
|
|
const newArgs = this.type === "classic" ? this.args.filter(item => !item.includes(url)).join(" ") : this.options.text;
|
2021-04-26 14:47:03 +00:00
|
|
|
return {
|
2022-03-31 19:53:22 +00:00
|
|
|
caption: newArgs && newArgs.trim() ? newArgs.replaceAll("\n", "").replaceAll(" ", "") : random(names)
|
2021-04-26 14:47:03 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
static description = "Adds a Reddit watermark to an image";
|
|
|
|
static arguments = ["{text}"];
|
|
|
|
|
2021-05-24 19:31:44 +00:00
|
|
|
static noText = "You need to provide some text to add a Reddit watermark!";
|
2021-04-26 14:47:03 +00:00
|
|
|
static command = "reddit";
|
|
|
|
}
|
|
|
|
|
2022-01-21 04:52:29 +00:00
|
|
|
export default RedditCommand;
|