Skip to content

Commit

Permalink
Fixed updating guild icon
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcole1340 committed Apr 9, 2021
1 parent 44193e4 commit 5b38cef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Discord/Parts/Guild/Guild.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public function getCreatableAttributes(): array
return [
'name' => $this->name,
'region' => $this->region,
'icon' => $this->icon,
'icon' => $this->attributes['icon'],
'verification_level' => $this->verification_level,
'default_message_notifications' => $this->default_message_notifications,
'explicit_content_filter' => $this->explicit_content_filter,
Expand All @@ -450,9 +450,9 @@ public function getUpdatableAttributes(): array
'explicit_content_filter' => $this->explicit_content_filter,
'afk_channel_id' => $this->afk_channel_id,
'afk_timeout' => $this->afk_timeout,
'icon' => $this->icon,
'splash' => $this->splash,
'banner' => $this->banner,
'icon' => $this->attributes['icon'],
'splash' => $this->attributes['splash'],
'banner' => $this->attributes['banner'],
'system_channel_id' => $this->system_channel_id,
'rules_channel_id' => $this->rules_channel_id,
'public_updates_channel_id' => $this->public_updates_channel_id,
Expand Down
2 changes: 1 addition & 1 deletion src/Discord/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function imageToBase64(string $filepath): string
throw new \InvalidArgumentException('The given filepath does not exist.');
}

$mimetype = mime_content_type($filepath);
$mimetype = \mime_content_type($filepath);

if (array_search($mimetype, ['image/jpeg', 'image/png', 'image/gif']) === false) {
throw new \InvalidArgumentException('The given filepath is not one of jpeg, png or gif.');
Expand Down

0 comments on commit 5b38cef

Please sign in to comment.