We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47e4d11 commit 2a5d227Copy full SHA for 2a5d227
app/services/discord/index.ts
@@ -116,12 +116,14 @@ export class DiscordBot extends Service {
116
this.discord.user?.setActivity(activity);
117
}
118
119
+ // sets both the bot's avatar and the guild's icon
120
async setIcon(
121
path = this.data?.lastDiscordGuildIcon ?? "resources/discord-guild-icons/default.png"
122
): Promise<boolean> {
123
if (!this.ready || !this.discord.user) return false;
124
try {
125
await this.discord.user.setAvatar(path);
126
+ await this.getGuild()?.setIcon(path);
127
if (this.data) {
128
this.data.lastDiscordGuildIcon = path;
129
await this.data.save();
0 commit comments