Skip to content

Commit

Permalink
feat(Bots): Add ability to set avatar url manually
Browse files Browse the repository at this point in the history
  • Loading branch information
jurienhamaker committed Feb 20, 2024
1 parent 04abd9e commit d71ccf9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/hoshi/src/events/app.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@ export class AppEvents {
},
],
});

if (process.env['HOSHI_AVATAR_URL']) {
client.user
.setAvatar(process.env['HOSHI_AVATAR_URL'])
.then((u) =>
this._logger.log(`Set client avatar to ${u.avatarURL()}`),
)
.catch(() => this._logger.warn('Failed to set bot avatar'));
}
}
}
9 changes: 9 additions & 0 deletions apps/koto/src/events/app.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@ export class AppEvents {
},
],
});

if (process.env['KOTO_AVATAR_URL']) {
client.user
.setAvatar(process.env['KOTO_AVATAR_URL'])
.then((u) =>
this._logger.log(`Set client avatar to ${u.avatarURL()}`),
)
.catch(() => this._logger.warn('Failed to set bot avatar'));
}
}
}
9 changes: 9 additions & 0 deletions apps/kusari/src/events/app.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@ export class AppEvents {
},
],
});

if (process.env['KUSARI_AVATAR_URL']) {
client.user
.setAvatar(process.env['KUSARI_AVATAR_URL'])
.then((u) =>
this._logger.log(`Set client avatar to ${u.avatarURL()}`),
)
.catch(() => this._logger.warn('Failed to set bot avatar'));
}
}
}

0 comments on commit d71ccf9

Please sign in to comment.