User Preferences Fix (#83)

* Fix: incorrect user preferences saving
This commit is contained in:
Kevin Dang
2024-07-10 20:41:23 -07:00
committed by GitHub
parent 35b9ad71cb
commit 61d3dc4312
3 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ export const Capacity: SlashCommand = {
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
// set state of bot chat features
openConfig(`${interaction.client.user.username}-config.json`, interaction.commandName, interaction.options.get('context-capacity')?.value)
openConfig(`${interaction.user.username}-config.json`, interaction.commandName, interaction.options.get('context-capacity')?.value)
interaction.reply({
content: `Message History Capacity has been set to \`${interaction.options.get('context-capacity')?.value}\``,

View File

@@ -23,7 +23,7 @@ export const MessageStream: SlashCommand = {
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
// save value to json and write to it
openConfig(`${interaction.client.user.username}-config.json`, interaction.commandName, interaction.options.get('stream')?.value)
openConfig(`${interaction.user.username}-config.json`, interaction.commandName, interaction.options.get('stream')?.value)
interaction.reply({
content: `Message streaming preferences set to: \`${interaction.options.get('stream')?.value}\``,

View File

@@ -23,7 +23,7 @@ export const MessageStyle: SlashCommand = {
if (!channel || channel.type !== (ChannelType.PublicThread && ChannelType.GuildText)) return
// set the message style
openConfig(`${interaction.client.user.username}-config.json`, interaction.commandName, interaction.options.get('embed')?.value)
openConfig(`${interaction.user.username}-config.json`, interaction.commandName, interaction.options.get('embed')?.value)
interaction.reply({
content: `Message style preferences for embed set to: \`${interaction.options.get('embed')?.value}\``,