Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Jan 11, 2024
1 parent f1d35da commit a313686
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 50 deletions.
82 changes: 40 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ indexmap = "2"
tracing = "0.1"
gettext = "0.4"
linkify = "0.10"
strsim = "0.10"
strsim = "0.11"
sysinfo = "0.30"
num-format = "0.4"
itertools = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ pub async fn botstats(ctx: Context<'_>) -> CommandResult {

let guild_ids = cache.guilds();
let (total_guild_count, total_voice_clients, total_members) = {
let guilds: Vec<_> = guild_ids.iter().filter_map(|id| cache.guild(id)).collect();
let guilds: Vec<_> = guild_ids.iter().filter_map(|id| cache.guild(*id)).collect();

(
guilds.len(),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ pub async fn refresh_ofs(ctx: Context<'_>) -> CommandResult {
let all_guild_owners = cache
.guilds()
.iter()
.filter_map(|id| cache.guild(id).map(|g| g.owner_id))
.filter_map(|id| cache.guild(*id).map(|g| g.owner_id))
.collect::<Vec<_>>();

let current_ofs_members = support_guild_members
Expand Down
4 changes: 2 additions & 2 deletions src/commands/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ pub async fn nick(

if author.id != user.id
&& !guild_id
.member(ctx, author)
.member(ctx, author.id)
.await?
.permissions(ctx)?
.administrator()
Expand Down Expand Up @@ -1283,7 +1283,7 @@ pub async fn setup(
let channel = if let Some(channel) = channel {
channel
} else {
let author_member = guild_id.member(ctx, author).await?;
let author_member = guild_id.member(ctx, author.id).await?;

let mut text_channels: Vec<_> = {
let guild = require_guild!(ctx);
Expand Down
8 changes: 6 additions & 2 deletions src/events/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,12 @@ async fn process_support_dm(

let mut attachments = Vec::new();
for attachment in &message.attachments {
let attachment_builder =
serenity::CreateAttachment::url(&ctx.http, &attachment.url).await?;
let attachment_builder = serenity::CreateAttachment::url(
&ctx.http,
attachment.url.as_str(),
attachment.filename.to_string(),
)
.await?;
attachments.push(attachment_builder);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ async fn _main(start_time: std::time::SystemTime) -> Result<()> {
..poise::FrameworkOptions::default()
};

let mut client = serenity::Client::builder(token, intents)
let mut client = serenity::Client::builder(&token, intents)
.voice_manager::<songbird::Songbird>(songbird)
.framework(poise::Framework::new(framework_options, |_, _, _| {
Box::pin(async { Ok(data) })
Expand Down

0 comments on commit a313686

Please sign in to comment.