Compare commits
3 commits
4.1.0-Pudd
...
main
Author | SHA1 | Date | |
---|---|---|---|
d4109752e8 | |||
f08dbb462e | |||
0cf961718c |
4 changed files with 313 additions and 329 deletions
39
package.json
39
package.json
|
@ -1,38 +1,39 @@
|
|||
{
|
||||
"name": "muffinbot",
|
||||
"version": "4.1.0-pudding.r241119a",
|
||||
"version": "4.1.1-pudding.r250227a",
|
||||
"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",
|
||||
"@sapphire/discord.js-utilities": "^7.3.2",
|
||||
"@sapphire/framework": "^5.3.2",
|
||||
"@sapphire/pieces": "^4.3.1",
|
||||
"@sapphire/utilities": "^3.18.1",
|
||||
"discord-api-types": "^0.37.105",
|
||||
"discord.js": "^14.16.3",
|
||||
"@sapphire/utilities": "^3.18.2",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"discord.js": "^14.18.0",
|
||||
"dokdo": "^1.0.1",
|
||||
"dotenv": "^16.4.5",
|
||||
"semver": "^7.6.3"
|
||||
"dotenv": "^16.4.7",
|
||||
"es-hangul": "^2.3.1",
|
||||
"semver": "^7.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@eslint/js": "^9.15.0",
|
||||
"@eslint/eslintrc": "^3.3.0",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@migan/prettier-config": "^1.2.0",
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/node": "^22.13.5",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
||||
"@typescript-eslint/parser": "^8.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
||||
"@typescript-eslint/parser": "^8.25.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.15.0",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"globals": "^15.12.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"prettier": "^3.3.3",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"globals": "^15.15.0",
|
||||
"nodemon": "^3.1.9",
|
||||
"prettier": "^3.5.2",
|
||||
"prisma": "^5.22.0",
|
||||
"typescript": "^5.6.3"
|
||||
"typescript": "^5.7.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
|
582
pnpm-lock.yaml
582
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,7 @@
|
|||
import { ChatInputCommandInteraction, codeBlock, Message } from 'discord.js'
|
||||
import { type Args, Command } from '@sapphire/framework'
|
||||
import { ApplyOptions } from '@sapphire/decorators'
|
||||
import { josa } from 'es-hangul'
|
||||
|
||||
@ApplyOptions<Command.Options>({
|
||||
name: '배워',
|
||||
|
@ -43,7 +44,7 @@ export default class LearnCommand extends Command {
|
|||
const config = this.container.config
|
||||
const IG_MSG = '해ㄷ당 단어는 배울ㄹ 수 없어요.'
|
||||
const DI_MSG = '해당 단ㅇ어는 개발자님이 특별히 금지하였ㅇ어요.'
|
||||
const SUCCESS_MSG = '을/를 배웠ㅇ어요.'
|
||||
const SUCCESS_MSG = ' 배웠ㅇ어요.'
|
||||
|
||||
let command: string | undefined
|
||||
let result: string | undefined
|
||||
|
@ -114,8 +115,8 @@ export default class LearnCommand extends Command {
|
|||
})
|
||||
|
||||
return ctx instanceof Message
|
||||
? await ctx.reply(command + SUCCESS_MSG)
|
||||
: await ctx.editReply(command + SUCCESS_MSG)
|
||||
? await ctx.reply(josa(command, '을/를') + SUCCESS_MSG)
|
||||
: await ctx.editReply(josa(command, '을/를') + SUCCESS_MSG)
|
||||
}
|
||||
|
||||
public async messageRun(msg: Message, args: Args) {
|
||||
|
|
|
@ -27,7 +27,10 @@ export default class ListCommand extends Command {
|
|||
user_id: user.id,
|
||||
},
|
||||
})
|
||||
const list: string[] = []
|
||||
const list: {
|
||||
command: string
|
||||
result: string
|
||||
}[] = []
|
||||
|
||||
if (!data[0]) {
|
||||
return await ctx.reply({
|
||||
|
@ -36,8 +39,11 @@ export default class ListCommand extends Command {
|
|||
})
|
||||
}
|
||||
|
||||
for (const listData of data) {
|
||||
list.push(listData.command)
|
||||
for (const { command, result } of data) {
|
||||
list.push({
|
||||
command,
|
||||
result,
|
||||
})
|
||||
}
|
||||
|
||||
await ctx.reply({
|
||||
|
@ -46,7 +52,7 @@ export default class ListCommand extends Command {
|
|||
title: `${user.username}님의 지식`,
|
||||
description: `총합: ${data.length}개\n${codeBlock(
|
||||
'md',
|
||||
list.map(item => `- ${item}`).join('\n'),
|
||||
list.map(item => `- ${item.command}: ${item.result}`).join('\n'),
|
||||
)}`,
|
||||
color: this.container.embedColors.default,
|
||||
timestamp: new Date().toISOString(),
|
||||
|
|
Loading…
Reference in a new issue