refactor: rename stores to memory
This commit is contained in:
parent
8bb857d4e4
commit
a261bbdb9b
6 changed files with 28 additions and 16 deletions
33
deno.lock
generated
33
deno.lock
generated
|
|
@ -4,6 +4,7 @@
|
|||
"jsr:@std/fs@*": "1.0.18",
|
||||
"jsr:@std/path@*": "1.1.0",
|
||||
"jsr:@std/path@^1.1.0": "1.1.0",
|
||||
"npm:@discordjs/voice@*": "0.18.0",
|
||||
"npm:@types/node@*": "22.12.0",
|
||||
"npm:cainode@latest": "1.2.2",
|
||||
"npm:discord.js@*": "14.20.0"
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
"@discordjs/formatters",
|
||||
"@discordjs/util",
|
||||
"@sapphire/shapeshift",
|
||||
"discord-api-types",
|
||||
"discord-api-types@0.38.12",
|
||||
"fast-deep-equal",
|
||||
"ts-mixer",
|
||||
"tslib"
|
||||
|
|
@ -44,7 +45,7 @@
|
|||
"@discordjs/formatters@0.6.1": {
|
||||
"integrity": "sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg==",
|
||||
"dependencies": [
|
||||
"discord-api-types"
|
||||
"discord-api-types@0.38.12"
|
||||
]
|
||||
},
|
||||
"@discordjs/rest@2.5.1": {
|
||||
|
|
@ -55,7 +56,7 @@
|
|||
"@sapphire/async-queue",
|
||||
"@sapphire/snowflake",
|
||||
"@vladfrangu/async_event_emitter",
|
||||
"discord-api-types",
|
||||
"discord-api-types@0.38.12",
|
||||
"magic-bytes.js",
|
||||
"tslib",
|
||||
"undici"
|
||||
|
|
@ -64,6 +65,16 @@
|
|||
"@discordjs/util@1.1.1": {
|
||||
"integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g=="
|
||||
},
|
||||
"@discordjs/voice@0.18.0": {
|
||||
"integrity": "sha512-BvX6+VJE5/vhD9azV9vrZEt9hL1G+GlOdsQaVl5iv9n87fkXjf3cSwllhR3GdaUC8m6dqT8umXIWtn3yCu4afg==",
|
||||
"dependencies": [
|
||||
"@types/ws",
|
||||
"discord-api-types@0.37.120",
|
||||
"prism-media",
|
||||
"tslib",
|
||||
"ws"
|
||||
]
|
||||
},
|
||||
"@discordjs/ws@1.2.3": {
|
||||
"integrity": "sha512-wPlQDxEmlDg5IxhJPuxXr3Vy9AjYq5xCvFWGJyD7w7Np8ZGu+Mc+97LCoEc/+AYCo2IDpKioiH0/c/mj5ZR9Uw==",
|
||||
"dependencies": [
|
||||
|
|
@ -73,7 +84,7 @@
|
|||
"@sapphire/async-queue",
|
||||
"@types/ws",
|
||||
"@vladfrangu/async_event_emitter",
|
||||
"discord-api-types",
|
||||
"discord-api-types@0.38.12",
|
||||
"tslib",
|
||||
"ws"
|
||||
]
|
||||
|
|
@ -160,6 +171,9 @@
|
|||
],
|
||||
"scripts": true
|
||||
},
|
||||
"discord-api-types@0.37.120": {
|
||||
"integrity": "sha512-7xpNK0EiWjjDFp2nAhHXezE4OUWm7s1zhc/UXXN6hnFFU8dfoPHgV0Hx0RPiCa3ILRpdeh152icc68DGCyXYIw=="
|
||||
},
|
||||
"discord-api-types@0.38.12": {
|
||||
"integrity": "sha512-vqkRM50N5Zc6OVckAqtSslbUEoXmpN4bd9xq2jkoK9fgO3KNRIOyMMQ7ipqjwjKuAgzWvU6G8bRIcYWaUe1sCA=="
|
||||
},
|
||||
|
|
@ -173,7 +187,7 @@
|
|||
"@discordjs/util",
|
||||
"@discordjs/ws",
|
||||
"@sapphire/snowflake",
|
||||
"discord-api-types",
|
||||
"discord-api-types@0.38.12",
|
||||
"fast-deep-equal",
|
||||
"lodash.snakecase",
|
||||
"magic-bytes.js",
|
||||
|
|
@ -193,6 +207,9 @@
|
|||
"magic-bytes.js@1.12.1": {
|
||||
"integrity": "sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA=="
|
||||
},
|
||||
"prism-media@1.3.5": {
|
||||
"integrity": "sha512-IQdl0Q01m4LrkN1EGIE9lphov5Hy7WWlH6ulf5QdGePLlPas9p2mhgddTEHrlaXYjjFToM1/rWuwF37VF4taaA=="
|
||||
},
|
||||
"ts-mixer@6.0.4": {
|
||||
"integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA=="
|
||||
},
|
||||
|
|
@ -206,11 +223,7 @@
|
|||
"integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw=="
|
||||
},
|
||||
"ws@8.18.2": {
|
||||
"integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==",
|
||||
"optionalPeers": [
|
||||
"bufferutil@^4.0.1",
|
||||
"utf-8-validate@>=5.0.2"
|
||||
]
|
||||
"integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
SlashCommandBuilder,
|
||||
} from "npm:discord.js";
|
||||
import { Command } from "../../types.ts";
|
||||
import { settings } from "../../stores.ts";
|
||||
import { memory } from "../../memory.ts";
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
@ -13,7 +13,7 @@ export default {
|
|||
.setDescription("Select the channel for futures chats.")
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
async execute(interaction: ChatInputCommandInteraction<CacheType>) {
|
||||
settings.textChannelId = interaction.channelId;
|
||||
memory.textChannelId = interaction.channelId;
|
||||
await interaction.reply(`Futures chats will be started in this channel.`);
|
||||
},
|
||||
} as Command;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Events, CacheType, ChatInputCommandInteraction, MessageFlags } from "npm:discord.js";
|
||||
import { Event } from "../../types.ts";
|
||||
import { commands } from "../../stores.ts";
|
||||
import { commands } from "../../memory.ts";
|
||||
|
||||
export default {
|
||||
name: Events.InteractionCreate,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ import { Command, Event } from "./types.ts";
|
|||
import { gatherPaths } from "./gatherer.ts";
|
||||
import { exists } from "jsr:@std/fs/exists";
|
||||
import cai from "./cai.ts";
|
||||
import { commands } from "./stores.ts";
|
||||
import { client } from "./stores.ts";
|
||||
import { commands, client } from "./memory.ts";
|
||||
|
||||
async function registerCommand(path: string) {
|
||||
const { default: command }: { default: Command } = await import(path);
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@ export const client = new Client({
|
|||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent],
|
||||
});
|
||||
export const commands: {[index:string]:Command} = {}
|
||||
export const settings = {textChannelId: "", voiceChannelId: "", characterId: ""}
|
||||
export const memory = {textChannelId: "", voiceChannelId: "", characterId: ""}
|
||||
Loading…
Add table
Add a link
Reference in a new issue