woomy-v2/bot/commands/Test/lastmessage.js

18 lines
495 B
JavaScript
Raw Normal View History

2020-10-18 00:58:58 +00:00
const Command = require('../../base/Command.js');
2020-08-18 08:30:05 +00:00
class Lastmessage extends Command {
2020-10-18 00:58:58 +00:00
constructor (client) {
super(client, {
description: 'Grab last message sent to a channel.',
usage: 'lastmessage',
});
}
2020-08-18 08:30:05 +00:00
2020-10-18 00:58:58 +00:00
async run (message, args, data) { // eslint-disable-line no-unused-vars
const lastMsg = await this.client.functions.getLastMessage(message.channel);
message.channel.send(lastMsg);
}
2020-08-18 08:30:05 +00:00
}
module.exports = Lastmessage;