Compare commits
No commits in common. "4d20d9e6080d30fae268c8be9516186f70208740" and "476ff7cfc4257f5682d09c61da50378bf8b83dec" have entirely different histories.
4d20d9e608
...
476ff7cfc4
3 changed files with 1 additions and 42 deletions
|
@ -22,15 +22,7 @@ export default async function AddMoon(interaction: CommandInteraction) {
|
|||
|
||||
await moonSetting.Save(UserSetting, moonSetting);
|
||||
|
||||
const allMoons = await Moon.FetchMoonCountByUserId(interaction.user.id);
|
||||
|
||||
let moonNumber = allMoons + 1;
|
||||
|
||||
if (allMoons < moonCount) {
|
||||
moonNumber = moonCount + 1;
|
||||
}
|
||||
|
||||
const moon = new Moon(moonNumber, description, interaction.user.id);
|
||||
const moon = new Moon(moonCount + 1, description, interaction.user.id);
|
||||
|
||||
await moon.Save(Moon, moon);
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
import { CommandInteraction, PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../../type/command";
|
||||
import UserSetting from "../../database/entities/UserSetting";
|
||||
|
||||
export default class MoonSet extends Command {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.CommandBuilder = new SlashCommandBuilder()
|
||||
.setName("moonset")
|
||||
.setDescription("Manually set a user's moons")
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.addUserOption(x => x
|
||||
.setName("user")
|
||||
.setDescription("The user to set")
|
||||
.setRequired(true))
|
||||
.addNumberOption(x => x
|
||||
.setName("count")
|
||||
.setDescription("The amount the user will have")
|
||||
.setRequired(true)
|
||||
.setMinValue(0));
|
||||
}
|
||||
|
||||
public override async execute(interaction: CommandInteraction) {
|
||||
const user = interaction.options.get("user", true).user!;
|
||||
const count = interaction.options.get("count", true).value! as number;
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
import DefaultValues from "../constants/DefaultValues";
|
||||
import UserSetting from "../database/entities/UserSetting";
|
||||
|
||||
export default class UserSettingsHelper {
|
||||
}
|
Loading…
Reference in a new issue