Skip to content

Commit 088cf9a

Browse files
authored
Make create_application_emoji use DataUri (#3450)
Change the `image` parameter of `create_application_emoji` to `DataUri` instead of `&str`, similar to `GuildId::create_emoji`.
1 parent e256f96 commit 088cf9a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gateway/client/context.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::sync::Arc;
33
use dashmap::DashMap;
44
use futures::channel::mpsc::UnboundedSender as Sender;
55

6+
use crate::builder::DataUri;
67
#[cfg(feature = "cache")]
78
pub use crate::cache::Cache;
89
#[cfg(feature = "collector")]
@@ -324,11 +325,11 @@ impl Context {
324325
///
325326
/// See [`GuildId::create_emoji`] for information about name and filesize requirements. This
326327
/// method will error if said requirements are not met.
327-
pub async fn create_application_emoji(&self, name: &str, image: &str) -> Result<Emoji> {
328+
pub async fn create_application_emoji(&self, name: &str, image: DataUri<'_>) -> Result<Emoji> {
328329
#[derive(serde::Serialize)]
329330
struct CreateEmoji<'a> {
330331
name: &'a str,
331-
image: &'a str,
332+
image: DataUri<'a>,
332333
}
333334

334335
let body = CreateEmoji {

0 commit comments

Comments
 (0)