Skip to content

Commit

Permalink
fix: write sucessHandles
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthh committed Aug 2, 2023
1 parent 5b6b369 commit 5a93788
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/apecoin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function manageRoles(client: Client, guildId: string, handles: any[], acti

for (const handle of handles) {
try {
const member = await guild.members.fetch(handle.discordHandle);
const member = await guild.members.fetch(handle.discordHandle).catch(() => null);

if (member) {
await member.roles[action](role);
Expand All @@ -113,7 +113,7 @@ async function manageRoles(client: Client, guildId: string, handles: any[], acti
}

const BulkWriterClient = new BulkWriter();
await BulkWriterClient.updateRolesLogs(action, handles, ROLE_NAME);
await BulkWriterClient.updateRolesLogs(action, sucessHandles, ROLE_NAME);
}

export async function discordRoleManager(_?: string, publicAddress?: string) {
Expand Down

0 comments on commit 5a93788

Please sign in to comment.