Skip to content

Commit

Permalink
User Preferences Fix (#83)
Browse files Browse the repository at this point in the history
* Fix: incorrect user preferences saving
  • Loading branch information
kevinthedang committed Jul 11, 2024
1 parent 35b9ad7 commit 61d3dc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/capacity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}\``,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/messageStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}\``,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/messageStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}\``,
Expand Down

0 comments on commit 61d3dc4

Please sign in to comment.