Pull/Switch Model Commands Fix (#137)

* Update: Channel checker and channel name gone

* Add: note of where problem can be

* Update: Check if model already exists for Pull Command

* Add: User/Admin Command Constants

* Update: version increment
This commit is contained in:
Kevin Dang
2024-11-08 20:09:01 -08:00
committed by GitHub
parent 1ccd1a012e
commit 33152b33f3
15 changed files with 67 additions and 40 deletions

View File

@@ -1,3 +1,4 @@
import { ChannelType } from 'discord.js'
import { UserMessage } from './index.js'
export interface UserConfiguration {
@@ -42,6 +43,21 @@ export interface Channel {
messages: UserMessage[]
}
/**
* The following 2 types is allow for better readability in commands
* Admin Command -> Don't run in Threads
* User Command -> Used anywhere
*/
export const AdminCommand = [
ChannelType.GuildText
]
export const UserCommand = [
ChannelType.GuildText,
ChannelType.PublicThread,
ChannelType.PrivateThread
]
/**
* Check if the configuration we are editing/taking from is a Server Config
* @param key name of command we ran

View File

@@ -53,7 +53,6 @@ export async function clearChannelInfo(filename: string, channel: TextChannel, u
}
})
})
console.log(cleanedHistory)
return cleanedHistory
}