mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-12 11:56:06 -05:00
Adjusted Slash Command Scope (#91)
* Update: Slash Command Scope * Update: version increment
This commit is contained in:
@@ -8,7 +8,7 @@ services:
|
||||
build: ./ # find docker file in designated path
|
||||
container_name: discord
|
||||
restart: always # rebuild container always
|
||||
image: discord/bot:0.5.6
|
||||
image: discord/bot:0.5.7
|
||||
environment:
|
||||
CLIENT_TOKEN: ${CLIENT_TOKEN}
|
||||
GUILD_ID: ${GUILD_ID}
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-ollama",
|
||||
"version": "0.5.6",
|
||||
"version": "0.5.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-ollama",
|
||||
"version": "0.5.6",
|
||||
"version": "0.5.7",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"discord.js": "^14.15.3",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-ollama",
|
||||
"version": "0.5.6",
|
||||
"version": "0.5.7",
|
||||
"description": "Ollama Integration into discord",
|
||||
"main": "build/index.js",
|
||||
"exports": "./build/index.js",
|
||||
|
||||
@@ -20,7 +20,7 @@ export const Capacity: SlashCommand = {
|
||||
run: async (client: Client, interaction: CommandInteraction) => {
|
||||
// fetch channel and message
|
||||
const channel = await client.channels.fetch(interaction.channelId)
|
||||
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
if (!channel || channel.type !== (ChannelType.PrivateThread && ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
|
||||
// set state of bot chat features
|
||||
openConfig(`${interaction.user.username}-config.json`, interaction.commandName, interaction.options.get('context-capacity')?.value)
|
||||
|
||||
@@ -20,8 +20,7 @@ export const ChannelToggle: SlashCommand = {
|
||||
run: async (client: Client, interaction: CommandInteraction) => {
|
||||
// fetch channel location
|
||||
const channel = await client.channels.fetch(interaction.channelId)
|
||||
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
|
||||
if (!channel || channel.type !== (ChannelType.PrivateThread && ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
|
||||
// set state of bot channel preferences
|
||||
openConfig(`${interaction.guildId}-config.json`, interaction.commandName, interaction.options.get('toggle-channel')?.value)
|
||||
|
||||
@@ -20,7 +20,7 @@ export const MessageStream: SlashCommand = {
|
||||
run: async (client: Client, interaction: CommandInteraction) => {
|
||||
// verify channel
|
||||
const channel = await client.channels.fetch(interaction.channelId)
|
||||
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
if (!channel || channel.type !== (ChannelType.PrivateThread && ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
|
||||
// save value to json and write to it
|
||||
openConfig(`${interaction.user.username}-config.json`, interaction.commandName, interaction.options.get('stream')?.value)
|
||||
|
||||
@@ -20,7 +20,7 @@ export const MessageStyle: SlashCommand = {
|
||||
run: async (client: Client, interaction: CommandInteraction) => {
|
||||
// fetch channel and message
|
||||
const channel = await client.channels.fetch(interaction.channelId)
|
||||
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
if (!channel || channel.type !== (ChannelType.PrivateThread && ChannelType.PublicThread && ChannelType.GuildText)) return
|
||||
|
||||
// set the message style
|
||||
openConfig(`${interaction.user.username}-config.json`, interaction.commandName, interaction.options.get('embed')?.value)
|
||||
|
||||
Reference in New Issue
Block a user