mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 12:22:00 +00:00
24 lines
No EOL
895 B
JavaScript
24 lines
No EOL
895 B
JavaScript
'use strict';
|
|
|
|
const commando = require("@iceprod/discord.js-commando");
|
|
const { getChannelMessage, trySend } = require("../../resources/functions");
|
|
|
|
module.exports = class mesemb extends commando.Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: "mesemb",
|
|
memberName: "mesemb",
|
|
group: "utility",
|
|
description: "Fetch embed info in a message."
|
|
});
|
|
}
|
|
async run(msg, arg) {
|
|
const args = arg.trim().split(/ +/);
|
|
const message = await getChannelMessage(this.client,msg,args[0],args[1]);
|
|
if (!message) {
|
|
return trySend(this.client, msg, "404 message not found!");
|
|
}
|
|
const mesemb = '```js\n'+JSON.stringify(message.embeds, null, 2)+'```';
|
|
return trySend(this.client, msg, {content:'Collected:'+mesemb,split:{maxLength:2000,char: ",",append:',```',prepend:'```js\n'}});
|
|
}
|
|
}; |