Skip to content

Commit 2a5d227

Browse files
Techbot121Meta Construct
authored andcommitted
forgot to set the guildicon as well
1 parent 47e4d11 commit 2a5d227

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/services/discord/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ export class DiscordBot extends Service {
116116
this.discord.user?.setActivity(activity);
117117
}
118118

119+
// sets both the bot's avatar and the guild's icon
119120
async setIcon(
120121
path = this.data?.lastDiscordGuildIcon ?? "resources/discord-guild-icons/default.png"
121122
): Promise<boolean> {
122123
if (!this.ready || !this.discord.user) return false;
123124
try {
124125
await this.discord.user.setAvatar(path);
126+
await this.getGuild()?.setIcon(path);
125127
if (this.data) {
126128
this.data.lastDiscordGuildIcon = path;
127129
await this.data.save();

0 commit comments

Comments
 (0)