mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 09:10:49 +00:00
Fix User/Role/Channel id parsing (#35)
* Import thiserror to make nicer errors * Create wrappers for id that exposes old parsing behavior (from mentions) * Use id wrappers when parsing parameters
This commit is contained in:
parent
431f295b41
commit
b4cf6ce94f
8 changed files with 91 additions and 21 deletions
|
@ -289,7 +289,7 @@ pub async fn save(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
|
|||
pub async fn forcesave(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
|
||||
let data = ctx.data.read().await;
|
||||
let osu = data.get::<OsuClient>().unwrap();
|
||||
let target = args.single::<serenity::model::id::UserId>()?;
|
||||
let target = args.single::<UserId>()?.0;
|
||||
|
||||
let username = args.quoted().trimmed().single::<String>()?;
|
||||
let user: Option<User> = osu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue