Skip to content

Commit

Permalink
fix bot accept to random group invite
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Jun 27, 2020
1 parent bd34906 commit a25d4dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/classes/MyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export = class MyHandler extends Handler {
onGroupRelationship(groupID: SteamID, relationship: number): void {
log.debug('Group relation changed', { steamID: groupID, relationship: relationship });
if (relationship === SteamUser.EClanRelationship.Invited) {
const join = !this.groups.includes(groupID.getSteamID64());
const join = this.groups.includes(groupID.getSteamID64());

log.info(`Got invited to group ${groupID.getSteamID64()}, ${join ? 'accepting...' : 'declining...'}`);
this.bot.client.respondToGroupInvite(groupID, !this.groups.includes(groupID.getSteamID64()));
Expand Down

0 comments on commit a25d4dd

Please sign in to comment.