blob: 67a81564a5132ed34cfdf9244b1edc41340d2953 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use std::path::Path;
use serenity::framework::standard::{
Args,
Command,
CommandError,
CommandOptions
};
use serenity::model::channel::Message;
use serenity::prelude::Context;
use std::sync::Arc;
pub struct Log;
impl Command for Log {
fn options(&self) -> Arc<CommandOptions> {
let default = CommandOptions::default();
let options = CommandOptions {
owners_only: true,
..default
};
Arc::new(options)
}
fn execute(&self, _: &mut Context, message: &Message, _: Args) -> Result<(), CommandError> {
message.channel_id.send_files(vec![Path::new("./output.log")], |m| m)?;
Ok(())
}
}
|