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

18 lines
460 B
JavaScript
Raw Normal View History

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