Assaro / DD_Bot

Discord Bot to Control Docker Services via the Docker Socket
GNU General Public License v3.0
35 stars 5 forks source link

Whitelist #16

Closed joshopdev closed 1 year ago

joshopdev commented 1 year ago

When I change the whitelist to true and add my id to both the admin and the userid sections I get the following error:

"You are not allowed to use this command" in discord.

When I turn off the whitelist it works just fine.

Assaro commented 1 year ago

Odd that this occurs. Never checked the case of someone being in the user and the admin List. Please tell me the command that gives you this error and also send me your settings. You may have entered something in a wrong way

joshopdev commented 1 year ago

Running just the /list command would give the error and it would be the same for all users. When it was just me in the admin list and I was not listed in the user list I would get that error. When I was listed in both the admin and user lists I would get that error. The only way to have it work was to disable the whitelist.

This is my settings.json file. (it has been sanitized)

{
  "LanguageSettings": {
    "Language": "en"
  },
  "DiscordSettings": {
    "Token": "MPN1BnQg_MyToken_KJJRSDKsdfoi23jlk32",
    "AdminIDs": [
      0951235052641524
    ],
    "UserWhitelist": true,
    "UserIDs": [
      0951235052641524,
      041170438009625,
      831669290250515
    ],
    "UsersCanStopContainers": true,
    "AllowedContainers": [
      "ECO"
    ]
  },
  "DockerSettings": {
    "BotName": "DD_Bot",
    "Retries": 6,
    "TimeBeforeRetry": 5
  }
}
Assaro commented 1 year ago

Weird. Probably had something wrong. I will check it out and release a bugfix as soon as possible

Assaro commented 1 year ago

I uploaded a potential fix. Please pull the docker-image DD_Bot:bugfix and report whether that fixes your problem. Will port to release if successful on your side

Assaro commented 1 year ago

Assuming that no reply means the issue is fixed i will now close this issue