Message Source Command

This commit is contained in:
Daniel Odendahl Jr
2019-02-20 17:34:01 +00:00
parent de9be8114c
commit 6bdb4399de
3 changed files with 28 additions and 2 deletions
+2 -1
View File
@@ -47,7 +47,7 @@ Xiao is a Discord bot coded in JavaScript with
7. Run `npm i -g pm2` to install PM2.
8. Run `pm2 start Xiao.js --name xiao` to run the bot.
## Commands (336)
## Commands (337)
### Utility:
* **eval:** Executes JavaScript code.
@@ -68,6 +68,7 @@ Xiao is a Discord bot coded in JavaScript with
* **emoji:** Responds with detailed information on an emoji.
* **first-message:** Responds with the first message ever sent to a channel.
* **id:** Responds with a user's ID.
* **message-source:** Responds with a codeblock containing a message's contents.
* **message:** Responds with detailed information on a message.
* **role:** Responds with detailed information on a role.
* **server:** Responds with detailed information on the server.
+25
View File
@@ -0,0 +1,25 @@
const Command = require('../../structures/Command');
const { shorten } = require('../../util/Util');
module.exports = class MessageSourceCommand extends Command {
constructor(client) {
super(client, {
name: 'message-source',
aliases: ['msg-source', 'message-src', 'msg-src'],
group: 'info',
memberName: 'message-source',
description: 'Responds with a codeblock containing a message\'s contents.',
args: [
{
key: 'message',
prompt: 'Which message do you want to get the source of?',
type: 'message'
}
]
});
}
run(msg, { message }) {
return msg.code(null, shorten(message.content, 1990));
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "101.5.0",
"version": "101.6.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {