Skip to content

Commit

Permalink
fix(client): Fix pinging roles and users
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Mar 30, 2020
1 parent 0942390 commit 5475e2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ export class IMClient extends Client {
public constructor({ version, token, type, instance, shardId, shardCount, flags, config }: ClientOptions) {
super(token, {
allowedMentions: {
everyone: false
everyone: false,
roles: true,
users: true
},
firstShardID: shardId - 1,
lastShardID: shardId - 1,
Expand Down
4 changes: 2 additions & 2 deletions src/framework/RequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export class IMRequestHandler extends RequestHandler {
return super
.request(method, url, auth, body, file, _route, short)
.then((res: any) => {
info.succeeded++;
this.requestStats.get(statKey).succeeded++;
return res;
})
.catch((err: any) => {
info.errors++;
this.requestStats.get(statKey).errors++;
throw err;
});
}
Expand Down

0 comments on commit 5475e2b

Please sign in to comment.