forked from Supositware/Haha-Yes
send a file from the server
This commit is contained in:
parent
4967b412c4
commit
a589016041
1 changed files with 31 additions and 0 deletions
31
commands/owner/sendfile.js
Normal file
31
commands/owner/sendfile.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const { Command } = require('discord-akairo');
|
||||
|
||||
class sendfileCommand extends Command {
|
||||
constructor() {
|
||||
super('sendfile', {
|
||||
aliases: ['sendfile'],
|
||||
category: 'owner',
|
||||
ownerOnly: 'true',
|
||||
args: [
|
||||
{
|
||||
id: 'file',
|
||||
type: 'string',
|
||||
match: 'rest'
|
||||
}
|
||||
],
|
||||
description: {
|
||||
content: 'send a file from the server',
|
||||
usage: '[a file on the server]',
|
||||
examples: ['config-exemple.jsonc']
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async exec(message, args) {
|
||||
message.channel.send('Here is your file.', {files: [args.file]}).catch(() =>{
|
||||
return message.channel.send('Could not find the requested file.');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = sendfileCommand;
|
Loading…
Reference in a new issue