Skip to content

Commit

Permalink
Use CreateAttachment for EditGuild::banner (serenity-rs#2844)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNorom authored and mkrasnitski committed Jul 28, 2024
1 parent 6828336 commit 4772799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder/edit_guild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ impl<'a> EditGuild<'a> {
/// guild's [`features`] list.
///
/// [`features`]: Guild::features
pub fn banner(mut self, banner: Option<Cow<'a, str>>) -> Self {
self.banner = Some(banner);
pub fn banner(mut self, banner: Option<&CreateAttachment<'_>>) -> Self {
self.banner = Some(banner.map(CreateAttachment::to_base64).map(Cow::from));
self
}

Expand Down

0 comments on commit 4772799

Please sign in to comment.