diff --git a/src/commands/NFD.ts b/src/commands/NFD.ts index dcd6af1..92fc807 100644 --- a/src/commands/NFD.ts +++ b/src/commands/NFD.ts @@ -22,7 +22,7 @@ import { userMention, } from 'discord.js' import { Discord, Guard, Slash, SlashChoice, SlashGroup, SlashOption } from 'discordx' -import { getCallerFromCommand, getNicknameFromUser, isTwitchSub } from '../utils/CommandUtils' +import { getCallerFromCommand, getNicknameFromUser } from '../utils/CommandUtils' import { injectable } from 'tsyringe' import { ORM } from '../persistence' import { NFDItem } from '../../prisma/generated/prisma-client-js' @@ -104,7 +104,7 @@ class NFD { } } - @Slash({ name: 'hatch', description: 'Attempt to hatch a new dino. Being a subscriber makes hatching more likely.' }) + @Slash({ name: 'hatch', description: 'Attempt to hatch a new dino.' }) @SlashGroup('dino') async mint(interaction: CommandInteraction) { const ownerMember = getCallerFromCommand(interaction) @@ -146,12 +146,7 @@ class NFD { // If we got this far then we are all set to hatch. // Roll the hatch check - let res = roll_dy_x_TimesPick_z(4, 1, 1) - - // Twitch subs get a re-roll - if (isTwitchSub(ownerMember, guild)) { - res = Math.max(res, roll_dy_x_TimesPick_z(4, 1, 1)) - } + const res = roll_dy_x_TimesPick_z(4, 1, 1) if (res <= this.MAXIMUM_FAILED_HATCHES - ownerRecordPrev.consecutiveFails) { this.updateDBfailedMint(ownerMember.id) diff --git a/src/utils/CommandUtils.ts b/src/utils/CommandUtils.ts index 1cd6081..9732bf1 100644 --- a/src/utils/CommandUtils.ts +++ b/src/utils/CommandUtils.ts @@ -46,23 +46,3 @@ export function getNicknameFromUser(target: User | GuildMember, guild: Guild): s return target.username } } - -export function isTwitchSub(user: GuildMember, guild: Guild) { - const PRIVILEGED_ROLES: Record = { - '103678524375699456': ['345501570483355648'], // The Banana Hammock ['Banana Hammock'] - } - - try { - const roles = PRIVILEGED_ROLES[guild.id] - for (let i = 0; i < roles.length; i++) { - if (user.roles.cache.has(roles[i])) { - return true - } - } - } catch (e) { - console.log(`ERROR: Looking for guild: ${guild.name} [${guild.id}] and did not find list of Twitch sub roles.`) - return false - } - // No guild matched. So we return false. - return false -}