Skip to content

Commit

Permalink
Merge pull request #188 from mmerfort/version-upgrades
Browse files Browse the repository at this point in the history
Version upgrades
  • Loading branch information
zuzuvelas authored Mar 29, 2023
2 parents bbabceb + 0f42a53 commit 73058b9
Show file tree
Hide file tree
Showing 31 changed files with 2,116 additions and 1,164 deletions.
2,650 changes: 1,697 additions & 953 deletions package-lock.json

Large diffs are not rendered by default.

55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,40 @@
"homepage": "https://github.com/Brexbot/DiscordBot#readme",
"type": "commonjs",
"devDependencies": {
"@types/cron": "^2.0.0",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.5.12",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"nodemon": "^2.0.15",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
"ts-node": "^10.4.0",
"tslib": "^2.4.0",
"typescript": "^4.5.4"
"@types/cron": "^2.0.1",
"@types/node": "^18.15.10",
"@types/node-fetch": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"nodemon": "^2.0.22",
"prettier": "^2.8.7",
"rimraf": "^4.4.1",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "^5.0.2"
},
"dependencies": {
"@dice-roller/rpg-dice-roller": "^5.1.0",
"@discordx/importer": "^1.1.10",
"@discordx/pagination": "^3.0.0",
"@discordx/utilities": "^5.0.0",
"@prisma/client": "^3.8.0",
"@twurple/api": "^5.0.13",
"@twurple/auth": "^5.0.13",
"@types/sharp": "^0.30.4",
"cron": "^2.1.0",
"discord-api-types": "^0.36.3",
"discord.js": "^14.0.3",
"discordx": "^11.0.3",
"@dice-roller/rpg-dice-roller": "^5.2.1",
"@discordx/importer": "^1.2.1",
"@discordx/pagination": "^3.4.1",
"@discordx/utilities": "^5.2.1",
"@prisma/client": "^4.12.0",
"@twurple/api": "^6.0.9",
"@twurple/auth": "^6.0.9",
"@types/sharp": "^0.31.1",
"cron": "^2.3.0",
"discord-api-types": "^0.37.37",
"discord.js": "^14.8.0",
"discordx": "^11.7.4",
"fs": "^0.0.1-security",
"hsl-rgb": "^1.0.0",
"localisetimemodule": "github:QOAL/localiseTimeModule",
"node-fetch": "^2.6.6",
"path": "^0.12.7",
"prisma": "^3.8.0",
"prisma": "^4.12.0",
"reflect-metadata": "^0.1.13",
"sharp": "^0.30.7",
"sharp": "^0.32.0",
"sponge-case": "^1.0.1"
}
}
119 changes: 81 additions & 38 deletions src/commands/NFD.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class NFD {
}
}

@Slash('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. Being a subscriber makes hatching more likely.' })
@SlashGroup('dino')
async mint(interaction: CommandInteraction) {
const ownerMember = getCallerFromCommand(interaction)
Expand Down Expand Up @@ -193,18 +193,25 @@ class NFD {
})
}

@Slash('view', { description: 'View an existing dino.' })
@Slash({ name: 'view', description: 'View an existing dino.' })
@SlashGroup('dino')
async view(
@SlashOption('name', {
@SlashOption({
name: 'name',
type: ApplicationCommandOptionType.String,
required: true,
description: "The dino's name",
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
this.allNFDAutoComplete(interaction).then((choices) => interaction.respond(choices))
},
})
name: string,
@SlashOption('silent', { type: ApplicationCommandOptionType.Boolean, required: false })
@SlashOption({
name: 'silent',
description: 'Whether to show the message only for you',
type: ApplicationCommandOptionType.Boolean,
required: false,
})
silent = true,
interaction: CommandInteraction
) {
Expand All @@ -222,18 +229,29 @@ class NFD {
return this.makeReply(nfd, interaction, owner, false, silent)
}

@Slash('collection', { description: "View a fellow dino enjoyer's collection." })
@Slash({ name: 'collection', description: "View a fellow dino enjoyer's collection." })
@SlashGroup('dino')
async collection(
@SlashOption('owner', {
@SlashOption({
name: 'owner',
type: ApplicationCommandOptionType.User,
required: false,
description: "The person who's collection you want to see.",
})
owner: GuildMember,
@SlashOption('silent', { type: ApplicationCommandOptionType.Boolean, required: false })
@SlashOption({
name: 'silent',
description: 'Whether to show the message only for you',
type: ApplicationCommandOptionType.Boolean,
required: false,
})
silent = true,
@SlashOption('type', { type: ApplicationCommandOptionType.String, required: false })
@SlashOption({
name: 'type',
description: 'The type of collection you want to see',
type: ApplicationCommandOptionType.String,
required: false,
})
@SlashChoice({ name: 'Favorites', value: 'FAVORITES' })
@SlashChoice({ name: 'Trash', value: 'TRASH' })
@SlashChoice({ name: 'All', value: 'ALL' })
Expand Down Expand Up @@ -369,10 +387,11 @@ class NFD {
})
}

@Slash('gift', { description: 'Gift your dino to another chatter. How kind.' })
@Slash({ name: 'gift', description: 'Gift your dino to another chatter. How kind.' })
@SlashGroup('dino')
async gift(
@SlashOption('name', {
@SlashOption({
name: 'name',
type: ApplicationCommandOptionType.String,
description: 'The name of the dino to be gifted.',
required: true,
Expand All @@ -381,7 +400,8 @@ class NFD {
},
})
name: string,
@SlashOption('recipient', {
@SlashOption({
name: 'recipient',
type: ApplicationCommandOptionType.User,
description: 'The chatter to receive the dino.',
required: true,
Expand Down Expand Up @@ -469,10 +489,11 @@ class NFD {
}
}

@Slash('rename', { description: 'Give your dino a better name' })
@Slash({ name: 'rename', description: 'Give your dino a better name' })
@SlashGroup('dino')
async rename(
@SlashOption('name', {
@SlashOption({
name: 'name',
type: ApplicationCommandOptionType.String,
required: true,
description: 'The *existing* name for the dino.',
Expand All @@ -481,7 +502,8 @@ class NFD {
},
})
name: string,
@SlashOption('replacement', {
@SlashOption({
name: 'replacement',
type: ApplicationCommandOptionType.String,
required: true,
description: 'The *new* name for the dino.',
Expand Down Expand Up @@ -550,12 +572,14 @@ class NFD {
return interaction.reply({ content: `**${callerName}** renamed **${name}** to **${replacement}**!` })
}

@Slash('favorite', { description: 'Toggle a dino as a favorite.' })
@Slash({ name: 'favorite', description: 'Toggle a dino as a favorite.' })
@SlashGroup('dino')
async favourite(
@SlashOption('name', {
@SlashOption({
name: 'name',
type: ApplicationCommandOptionType.String,
description: 'The name of the dino.',
required: true,
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
this.allNFDAutoComplete(interaction).then((choices) => interaction.respond(choices))
},
Expand All @@ -577,22 +601,27 @@ class NFD {
})
}

@Slash('breed', {
@Slash({
name: 'breed',
description: "A lotta yall still don't get it. You can consume two dinos to create a new dino.",
})
@SlashGroup('dino')
async slurp(
@SlashOption('first', {
@SlashOption({
name: 'first',
type: ApplicationCommandOptionType.String,
description: 'The first dino to be bred.',
required: true,
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
this.userNFDAutoComplete(interaction.user.id, interaction).then((choices) => interaction.respond(choices))
},
})
first: string,
@SlashOption('second', {
@SlashOption({
name: 'second',
type: ApplicationCommandOptionType.String,
description: 'The second dino to be bred.',
required: true,
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
this.userNFDAutoComplete(interaction.user.id, interaction).then((choices) => interaction.respond(choices))
},
Expand Down Expand Up @@ -656,12 +685,11 @@ class NFD {
await this.makeReply(newNFD, interaction, ownerMember, true)
}

@Slash('orgy', {
description: 'Throw a trashy dino orgy.',
})
@Slash({ name: 'orgy', description: 'Throw a trashy dino orgy.' })
@SlashGroup('dino')
async orgy(
@SlashOption('confirm', {
@SlashOption({
name: 'confirm',
type: ApplicationCommandOptionType.Boolean,
description: 'Please confirm you are ok with your non-favorite dinos being destroyed.',
required: false,
Expand Down Expand Up @@ -789,20 +817,21 @@ class NFD {
})
}

@Slash('rate', {
description: 'Make your approval or disapproval of a dino known.',
})
@Slash({ name: 'rate', description: 'Make your approval or disapproval of a dino known.' })
@SlashGroup('dino')
async covet(
@SlashOption('name', {
@SlashOption({
name: 'name',
type: ApplicationCommandOptionType.String,
description: 'The lucky dino.',
required: true,
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
this.allNFDAutoComplete(interaction).then((choices) => interaction.respond(choices))
},
})
name: string,
@SlashOption('action', {
@SlashOption({
name: 'action',
type: ApplicationCommandOptionType.String,
required: true,
description: 'Covet or Shun the dino?',
Expand Down Expand Up @@ -842,10 +871,15 @@ class NFD {
}
}

@Slash('vids', { description: 'Which dino is best dino? Which is most cursed?' })
@Slash({ name: 'vids', description: 'Which dino is best dino? Which is most cursed?' })
@SlashGroup('dino')
async vids(
@SlashOption('silent', { type: ApplicationCommandOptionType.Boolean, required: false })
@SlashOption({
name: 'silent',
description: 'Whether to show the message only for you',
type: ApplicationCommandOptionType.Boolean,
required: false,
})
silent = true,
interaction: CommandInteraction
) {
Expand Down Expand Up @@ -1612,14 +1646,17 @@ class NFD {
// MODERATOR BASEMENT
// ==================

@Slash('purge', {
@Slash({
name: 'purge',
description: 'Remove a dino from the database.',
defaultMemberPermissions: PermissionFlagsBits.ModerateMembers,
})
// @SlashGroup('mod', 'nfd')
@Guard(IsSuperUser)
async purge(
@SlashOption('name', {
@SlashOption({
name: 'name',
description: 'The name of the dino to delete',
type: ApplicationCommandOptionType.String,
required: true,
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
Expand All @@ -1643,20 +1680,23 @@ class NFD {
return interaction.reply({ content: `${nfd.name} has been deleted from the database.` })
}

@Slash('cooldown', {
@Slash({
name: 'cooldown',
description: 'Reset hatch, gift, and/or breed cooldowns.',
defaultMemberPermissions: PermissionFlagsBits.ModerateMembers,
})
// @SlashGroup('mod', 'nfd')
@Guard(IsSuperUser)
async cooldown(
@SlashOption('chatter', {
@SlashOption({
name: 'chatter',
type: ApplicationCommandOptionType.User,
required: true,
description: "The chatter who's cooldowns should be reset",
})
chatter: User | GuildMember,
@SlashOption('cooldown', {
@SlashOption({
name: 'cooldown',
type: ApplicationCommandOptionType.String,
required: true,
description: 'Which dino cooldown should be cooled down.',
Expand Down Expand Up @@ -1737,22 +1777,25 @@ class NFD {
return interaction.reply({ content: `${interaction.user} reset ${cooldown} cooldown for ${chatter}.` })
}

@Slash('reassign', {
@Slash({
name: 'reassign',
description: "Forcibly change a dino's owner.",
defaultMemberPermissions: PermissionFlagsBits.ModerateMembers,
})
// @SlashGroup('mod', 'nfd')
@Guard(IsSuperUser)
async reassign(
@SlashOption('nfd', {
@SlashOption({
name: 'nfd',
type: ApplicationCommandOptionType.String,
description: 'The name of the dino to be gifted.',
required: true,
autocomplete: function (this: NFD, interaction: AutocompleteInteraction) {
this.allNFDAutoComplete(interaction).then((choices) => interaction.respond(choices))
},
})
@SlashOption('recipient', {
@SlashOption({
name: 'recipient',
type: ApplicationCommandOptionType.User,
description: 'The chatter to receive the dino.',
required: true,
Expand Down
Loading

0 comments on commit 73058b9

Please sign in to comment.