Skip to content

Commit

Permalink
[fix] await in sync function
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe authored Jul 26, 2021
1 parent d2aad1b commit 1f256f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const guildMemberAdd = (client: Client, db: Db, tempDB: DB) => async (
// If there's autorole enabled..
if (serverSettings.joinAutorole) {
// For each role..
serverSettings.joinAutorole.split('|').forEach((role: string) => {
serverSettings.joinAutorole.split('|').forEach(async (role: string) => {
try {
const roleName = role.startsWith('bot-') ? role.substr(4) : role
const roleObj = member.guild.roles.find(element => element.name === roleName)
Expand Down

0 comments on commit 1f256f9

Please sign in to comment.