Add a cutie to owner list, update embed and ship commands

This commit is contained in:
Agatha 2020-04-01 21:23:42 +03:00
parent c96db0d68e
commit b8e691d364
1 changed files with 6 additions and 4 deletions

View File

@ -55,7 +55,7 @@ fn main() {
StandardFramework::new()
.configure(|c| {
c.with_whitespace(true)
.owners(vec![UserId(254310746450690048)].into_iter().collect())
.owners(vec![UserId(254310746450690048), UserId(687740609703706630)].into_iter().collect())
.prefixes(vec!["owo ", "OwO "])
.no_dm_prefix(true)
.case_insensitivity(true)
@ -163,7 +163,6 @@ fn host(ctx: &mut Context, message: &Message) -> CommandResult {
}
#[command]
#[checks(Owner)]
fn embed(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
use serde::Deserialize;
use serenity::utils::Colour;
@ -261,16 +260,19 @@ fn embed(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
m
});
let _ = message.channel_id.say(&ctx.http, format!("Embed requested by: {}", message.author));
Ok(())
}
#[command]
fn bottom_rng(ctx: &mut Context, message: &Message) -> CommandResult {
fn bottom_rng(ctx: &mut Context, message: &Message, mut args: Args) -> CommandResult {
use rand::{rngs::StdRng, SeedableRng};
let num = args.single::<u64>().unwrap_or(10);
let messages = message
.channel_id
.messages(&ctx.http, |get| get.before(message.id).limit(20));
.messages(&ctx.http, |get| get.before(message.id).limit(num));
if let Err(e) = messages {
let _ = message.channel_id.say(&ctx.http, format!("Error: {}", e));
} else {