Skip to content

Commit

Permalink
fix(vote): update vote role
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Jan 29, 2024
1 parent aae6882 commit 5dc909a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/managers/VoteManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WebhookPayload } from '@top-gg/sdk';
import { stripIndents } from 'common-tags';
import { ClusterManager } from 'discord-hybrid-sharding';
import { WebhookClient, userMention, EmbedBuilder } from 'discord.js';
import { badgeEmojis, LINKS } from '../utils/Constants.js';
import { badgeEmojis, LINKS, SUPPORT_SERVER_ID, VOTER_ROLE_ID } from '../utils/Constants.js';
import { getOrdinalSuffix, getUsername, modifyUserRole } from '../utils/Utils.js';
import { EventEmitter } from 'events';

Expand Down Expand Up @@ -95,15 +95,9 @@ export class VoteManager extends EventEmitter {
}

async addVoterRole(userId: string) {
await modifyUserRole(this.cluster, 'add', userId, '853116027588051022', '1201369361391300719');
await modifyUserRole(this.cluster, 'add', userId, SUPPORT_SERVER_ID, VOTER_ROLE_ID);
}
async removeVoterRole(userId: string) {
await modifyUserRole(
this.cluster,
'remove',
userId,
'853116027588051022',
'1201369361391300719',
);
await modifyUserRole(this.cluster, 'remove', userId, SUPPORT_SERVER_ID, VOTER_ROLE_ID);
}
}
2 changes: 2 additions & 0 deletions src/utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const isDevBuild = process.env.NODE_ENV === 'development';

export const CLIENT_ID = isDevBuild ? '798748015435055134' : '769921109209907241';
export const SUPPORT_SERVER_ID = '770256165300338709';
export const VOTER_ROLE_ID = '985153241727770655';


// Regexp
export const REGEX = {
Expand Down

0 comments on commit 5dc909a

Please sign in to comment.