changed a bunch of types so the macro run command works nicely

This commit is contained in:
2021-10-13 16:37:15 +01:00
parent 903daf65e6
commit a362a24cfc
13 changed files with 338 additions and 293 deletions

View File

@ -27,7 +27,7 @@ fn footer(ctx: &Context) -> impl FnOnce(&mut CreateEmbedFooter) -> &mut CreateEm
#[aliases("invite")]
#[description("Get information about the bot")]
#[group("Info")]
async fn info(ctx: &Context, invoke: CommandInvoke) {
async fn info(ctx: &Context, invoke: &mut CommandInvoke) {
let prefix = ctx.prefix(invoke.guild_id()).await;
let current_user = ctx.cache.current_user();
let footer = footer(ctx);
@ -61,7 +61,7 @@ Use our dashboard: https://reminder-bot.com/",
#[command]
#[description("Details on supporting the bot and Patreon benefits")]
#[group("Info")]
async fn donate(ctx: &Context, invoke: CommandInvoke) {
async fn donate(ctx: &Context, invoke: &mut CommandInvoke) {
let footer = footer(ctx);
let _ = invoke
@ -94,7 +94,7 @@ Just $2 USD/month!
#[command]
#[description("Get the link to the online dashboard")]
#[group("Info")]
async fn dashboard(ctx: &Context, invoke: CommandInvoke) {
async fn dashboard(ctx: &Context, invoke: &mut CommandInvoke) {
let footer = footer(ctx);
let _ = invoke
@ -113,7 +113,7 @@ async fn dashboard(ctx: &Context, invoke: CommandInvoke) {
#[command]
#[description("View the current time in your selected timezone")]
#[group("Info")]
async fn clock(ctx: &Context, invoke: CommandInvoke) {
async fn clock(ctx: &Context, invoke: &mut CommandInvoke) {
let ud = ctx.user_data(&invoke.author_id()).await.unwrap();
let now = Utc::now().with_timezone(&ud.timezone());