Public/Private Chat Threads (#62)

* add: validate thread creation in ollama channel

* rm: channel_id variable

* add: short notes for threads

* update: openFile to openConfig for clarity

* update: test ci runs on master

* add: notes for work

* add: basic chat storing via json

* update: stores entire msgHist according to capacity

* add: removes json file if thread is deleted

* add: chats with independent histories

* add: private vs public threads

* update: validate threads made by ollama for chats

* update: cleanup and version increment
This commit is contained in:
Kevin Dang
2024-06-10 19:47:08 -07:00
committed by GitHub
parent 9f77c5287f
commit 1973b1d3ae
22 changed files with 199 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
import { ChannelType, Client, CommandInteraction, ApplicationCommandOptionType } from 'discord.js'
import { SlashCommand } from '../utils/commands.js'
import { openFile } from '../utils/jsonHandler.js'
import { openConfig } from '../utils/jsonHandler.js'
export const Disable: SlashCommand = {
name: 'toggle-chat',
@@ -32,7 +32,7 @@ export const Disable: SlashCommand = {
}
// set state of bot chat features
openFile('config.json', interaction.commandName, interaction.options.get('enabled')?.value)
openConfig('config.json', interaction.commandName, interaction.options.get('enabled')?.value)
interaction.reply({
content: `Chat features has been \`${interaction.options.get('enabled')?.value ? "enabled" : "disabled" }\``,