rileyio / kiera-bot

A Multi-Use Discord bot
https://kierabot.xyz
MIT License
6 stars 4 forks source link

[Issue] xtcommand enabled/disabled setting not sticking #95

Closed rileyio closed 1 year ago

rileyio commented 1 year ago

Findings / Bug

A Discord server's commandGroups setting stored in Kiera's DB is getting reset when a Guild update event is detected due to reusing the same .onGuildCreate upsert - This was intended way back when setup, however, the new setting was added here during the initial development of the setting's purpose. The placeholder value is causing an overwrite.

To Reproduce

Steps to reproduce the behaviour:

  1. Use the /xtcommand command to set an integration's state true (also would affect false).
  2. Change a top level setting (name, toggle, etc) for the server.
  3. Try to use command contained within group (enabled), only to receive error.

Expected Behaviour

The /xtcommand integration group setting should only change when a server admin triggers the change.

Screenshots

Screenshots have been shared in chat to discuss and compare with 3rd party provider.