oops! 4
This commit is contained in:
parent
e75d3a2e8f
commit
86192010ec
|
@ -1,6 +1,6 @@
|
|||
import { SlashCommandBuilder } from '@discordjs/builders';
|
||||
import { CommandInteraction, GuildMember } from 'discord.js';
|
||||
import { changeCounterInteraction } from '../lib/counter';
|
||||
import { changeCounterInteraction, getCounter } from '../lib/counter';
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
@ -16,7 +16,7 @@ module.exports = {
|
|||
|
||||
execute: async (interaction: CommandInteraction, member: GuildMember) => {
|
||||
await interaction.deferReply({ephemeral: true});
|
||||
const amount = Math.trunc(interaction.options.getInteger('amount') || 1);
|
||||
const amount = Math.min(Math.trunc(interaction.options.getInteger('amount') || 1), getCounter(true));
|
||||
changeCounterInteraction(interaction, member, -amount, true);
|
||||
}
|
||||
};
|
|
@ -10,7 +10,7 @@ const counterCreamMessageFile = './counterCreamMessageID.txt';
|
|||
const PISS_CHANNEL = '975802147126018150';
|
||||
const CREAM_CHANNEL = '1098319707741900910';
|
||||
export const PISS_EMOJI = '🪣';
|
||||
export const CREAM_EMOJI = '<:PoolOfCum:1070350928240181340>';
|
||||
export const CREAM_EMOJI = '🥛';
|
||||
|
||||
function getCounterFile(cream: boolean) {
|
||||
return cream ? counterFileCream : counterFile;
|
||||
|
@ -38,7 +38,7 @@ export async function initializeCounter(cream: boolean) {
|
|||
}
|
||||
}
|
||||
|
||||
function getCounter(cream: boolean) {
|
||||
export function getCounter(cream: boolean) {
|
||||
return cream ? creamCounter : pissCounter;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue