Removed Channel Toggle Command (#115)

* Remove: channel-toggle as command and server config

* Remove: Thread interface

* Fix: Users Thread files will now delete

* Fix: Any user can chat in threads now

* Fix: Thread history files are now deleted with multiple users

* Update: version increment
This commit is contained in:
Kevin Dang
2024-09-14 13:34:40 -07:00
committed by GitHub
parent b49b464afb
commit 36a0cd309b
12 changed files with 86 additions and 182 deletions

View File

@@ -1,6 +1,6 @@
import { ChannelType, Client, CommandInteraction, TextChannel } from 'discord.js'
import { ChannelType, Client, CommandInteraction, TextChannel, ThreadChannel } from 'discord.js'
import { SlashCommand } from '../utils/commands.js'
import { openThreadInfo } from '../utils/index.js'
import { openChannelInfo } from '../utils/index.js'
export const PrivateThreadCreate: SlashCommand = {
name: 'private-thread',
@@ -23,7 +23,10 @@ export const PrivateThreadCreate: SlashCommand = {
// handle storing this chat channel
// store: thread.id, thread.name
openThreadInfo(`${thread.id}.json`, thread)
openChannelInfo(thread.id,
thread as ThreadChannel,
interaction.user.tag
)
// user only reply
return interaction.reply({