mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Message Source Command
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "101.5.0",
|
||||
"version": "101.6.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user