aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/pony.rs8
-rw-r--r--src/commands/reactionroles.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/pony.rs b/src/commands/pony.rs
index 532937a..cf18cc9 100644
--- a/src/commands/pony.rs
+++ b/src/commands/pony.rs
@@ -50,7 +50,7 @@ pub async fn randpony(ctx: Context<'_>) -> Result<(), Error> {
.json::<PonyResponse>()
.await?;
- match response_msg.unwrap().message().await {
+ match response_msg.message().await {
Ok(mut msg) => {
msg.edit(&ctx.discord(), |m| {
m.content("");
@@ -104,7 +104,7 @@ pub async fn tpony(
.json::<PonyResponse>()
.await?;
- match response_msg.unwrap().message().await {
+ match response_msg.message().await {
Ok(mut msg) => {
msg.edit(&ctx.discord(), |m| {
m.content("");
@@ -150,14 +150,14 @@ pub async fn ponybyid(
{
Ok(r) => r.json::<PonyResponse>().await?,
Err(_) => {
- response_msg.unwrap().message().await.unwrap().edit(ctx.discord(), |m| {
+ response_msg.message().await.unwrap().edit(ctx.discord(), |m| {
m.content("There was an error fetching that pony, please double-check your ID and try again.")
}).await?;
return Ok(());
}
};
- match response_msg.unwrap().message().await {
+ match response_msg.message().await {
Ok(mut msg) => {
msg.edit(&ctx.discord(), |m| {
m.content("");
diff --git a/src/commands/reactionroles.rs b/src/commands/reactionroles.rs
index 65de61a..ceb7154 100644
--- a/src/commands/reactionroles.rs
+++ b/src/commands/reactionroles.rs
@@ -73,7 +73,7 @@ pub async fn init(
e
});
m
- }).await?.unwrap().message().await?;
+ }).await?.message().await?;
if let Some(title) = ctx
.author()