Compare commits
No commits in common. "41fd07f4e76f02c6fe89ba2b8bf0ecc92875f8fc" and "eb2e6d9bdb9be67255ce517d0c568c01ce35917a" have entirely different histories.
41fd07f4e7
...
eb2e6d9bdb
8 changed files with 345 additions and 369 deletions
|
@ -17,7 +17,14 @@ const compat = new FlatCompat({
|
|||
|
||||
export default [
|
||||
{
|
||||
ignores: ['**/dist/', '**/.vscode/', '**/.idea/', '**/node_modules/'],
|
||||
ignores: [
|
||||
'**/.yarn/',
|
||||
'**/.pnp.*',
|
||||
'**/dist/',
|
||||
'**/.vscode/',
|
||||
'**/.idea/',
|
||||
'**/tsup.config.ts',
|
||||
],
|
||||
},
|
||||
...compat.extends('plugin:@typescript-eslint/recommended', 'prettier'),
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"ext": "ts,json",
|
||||
"exec": "tsc --sourcemap && cross-env NODE_ENV=development node --enable-source-maps dist/src",
|
||||
"exec": "pnpm build --sourcemap && node dist/src",
|
||||
"ignore": ["dist/**/*.*"]
|
||||
}
|
||||
|
|
32
package.json
32
package.json
|
@ -1,38 +1,38 @@
|
|||
{
|
||||
"name": "muffinbot",
|
||||
"version": "4.1.0-pudding.r241119a",
|
||||
"version": "4.0.0-pudding.r241027a",
|
||||
"main": "dist/src/index.js",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@prisma/client": "^5.22.0",
|
||||
"@sapphire/decorators": "^6.1.1",
|
||||
"@sapphire/discord.js-utilities": "^7.3.1",
|
||||
"@sapphire/framework": "^5.3.1",
|
||||
"@prisma/client": "^5.20.0",
|
||||
"@sapphire/decorators": "^6.1.0",
|
||||
"@sapphire/discord.js-utilities": "^7.3.0",
|
||||
"@sapphire/framework": "^5.2.1",
|
||||
"@sapphire/pieces": "^4.3.1",
|
||||
"@sapphire/utilities": "^3.18.1",
|
||||
"discord-api-types": "^0.37.105",
|
||||
"@sapphire/utilities": "^3.17.0",
|
||||
"discord-api-types": "^0.37.101",
|
||||
"discord.js": "^14.16.3",
|
||||
"dokdo": "^1.0.1",
|
||||
"dotenv": "^16.4.5",
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@eslint/js": "^9.15.0",
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.11.1",
|
||||
"@migan/prettier-config": "^1.2.0",
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.7.4",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
||||
"@typescript-eslint/parser": "^8.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
||||
"@typescript-eslint/parser": "^8.7.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.15.0",
|
||||
"eslint": "^9.11.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"globals": "^15.12.0",
|
||||
"globals": "^15.9.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"prettier": "^3.3.3",
|
||||
"prisma": "^5.22.0",
|
||||
"typescript": "^5.6.3"
|
||||
"prisma": "^5.20.0",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
|
606
pnpm-lock.yaml
606
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -6,7 +6,6 @@ import {
|
|||
ComponentType,
|
||||
codeBlock,
|
||||
Message,
|
||||
ButtonStyle,
|
||||
} from 'discord.js'
|
||||
import {
|
||||
DetailedDescriptionCommandObject,
|
||||
|
@ -101,18 +100,14 @@ export default class DeleteLearnCommand extends Command {
|
|||
type: ComponentType.StringSelect,
|
||||
customId: `${CUSTOM_ID}@${user.id}`,
|
||||
placeholder: '지울 데이터를 선택해ㅈ주세요',
|
||||
options,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: ComponentType.ActionRow,
|
||||
components: [
|
||||
{
|
||||
type: ComponentType.Button,
|
||||
customId: `${CUSTOM_ID}-cancel`,
|
||||
label: '취소',
|
||||
style: ButtonStyle.Danger,
|
||||
options: [
|
||||
...options,
|
||||
{
|
||||
label: '❌ 취소',
|
||||
description: '아무것도 삭제하지 않아요.',
|
||||
value: `${CUSTOM_ID}-cancel`,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -31,6 +31,18 @@ export default class DeleteLearnHandler extends InteractionHandler {
|
|||
const db = this.container.database
|
||||
const decimalRegexp = /^[0-9]/g
|
||||
|
||||
if (id === 'cancel')
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
title: '삭제',
|
||||
description: '아무것도 삭제하지 않았어요.',
|
||||
color: this.container.embedColors.fail,
|
||||
},
|
||||
],
|
||||
components: [],
|
||||
})
|
||||
|
||||
const itemId = interaction.component.options.map(item =>
|
||||
item.value.endsWith(`${id}`) ? item.label.match(decimalRegexp)![0] : null,
|
||||
)
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
import { ApplyOptions } from '@sapphire/decorators'
|
||||
import {
|
||||
InteractionHandler,
|
||||
InteractionHandlerTypes,
|
||||
} from '@sapphire/framework'
|
||||
import { ButtonInteraction } from 'discord.js'
|
||||
|
||||
@ApplyOptions<InteractionHandler.Options>({
|
||||
interactionHandlerType: InteractionHandlerTypes.Button,
|
||||
})
|
||||
export default class DeleteLearnCancelHandler extends InteractionHandler {
|
||||
private _CUSTOM_ID = 'maa$deleteLearn'
|
||||
|
||||
public async parse(interaction: ButtonInteraction) {
|
||||
if (interaction.customId !== `${this._CUSTOM_ID}-cancel`) return this.none()
|
||||
return this.some()
|
||||
}
|
||||
|
||||
public async run(interaction: ButtonInteraction) {
|
||||
return await interaction.update({
|
||||
embeds: [
|
||||
{
|
||||
title: '삭제',
|
||||
description: '아무것도 삭제하지 않았어요.',
|
||||
color: this.container.embedColors.fail,
|
||||
},
|
||||
],
|
||||
components: [],
|
||||
})
|
||||
}
|
||||
}
|
|
@ -10,7 +10,6 @@ export default class MessageCreateListener extends Listener {
|
|||
aliases: this.container.dokdoAliases,
|
||||
owners: [this.container.config.bot.owner_ID],
|
||||
prefix: prefix,
|
||||
secrets: [process.env.DATABASE_URL!],
|
||||
noPerm,
|
||||
})
|
||||
if (msg.author.bot) return
|
||||
|
|
Loading…
Reference in a new issue