Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
osufrlive
bot
Commits
ee160bdb
Commit
ee160bdb
authored
Nov 18, 2021
by
Hugo "ThePooN" Denizart
Browse files
🔊
RoleManagement: Add more logging
parent
e918b5f2
Pipeline
#4487
passed with stages
in 3 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/RoleManagement.ts
View file @
ee160bdb
...
...
@@ -35,10 +35,13 @@ export class RoleManagement {
rolesAddOperations
.
push
(
member
.
roles
.
add
(
roleId
).
catch
((
err
)
=>
this
.
logger
.
error
(
`An error occured while adding role
${
roleId
}
to
${
member
.
id
}
`
,
err
)));
await
Promise
.
all
(
rolesAddOperations
);
this
.
logger
.
info
(
`Updated
${
rolesAddOperations
.
length
}
members for
${
reactionId
}
in
${
messageId
}
`
);
}
}
else
this
.
logger
.
info
(
`Fetched no reaction for
${
reactionId
}
in
${
messageId
}
`
);
}
})()
as
never
);
Promise
.
all
(
operations
).
catch
((
err
)
=>
this
.
logger
.
error
(
"
An error occured while executing Discord ready operations
"
,
err
));
Promise
.
all
(
operations
)
.
then
(()
=>
this
.
logger
.
info
(
"
onConnected operations done
"
))
.
catch
((
err
)
=>
this
.
logger
.
error
(
"
An error occured while executing Discord ready operations
"
,
err
));
});
app
.
discordClient
.
onReactionAdd
.
subscribe
(({
reaction
,
member
})
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment