Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New setup - Prefix not working #88

Closed
faceslog opened this issue Jan 2, 2022 · 5 comments
Closed

New setup - Prefix not working #88

faceslog opened this issue Jan 2, 2022 · 5 comments

Comments

@faceslog
Copy link

faceslog commented Jan 2, 2022

Hi,

First of all thanks for your hard work. However I recently updated my docker image and since then it has been really hard to run the bot, (old docker compose below).
I just saw there is a new setup command that can be run from discord, so I guess no need to use DATABASE_TOKEN and AUTH_KEY as environment variables anymore. So I removed them from my docker compose and then the annoying stuff happened. Every time I restart my container I have to run the setup command, the prefix does not work I have to use * everywhere instead of !. ( See screen attached below). I would personally prefer the notion's integration app as environment variable that is probably more secure than discord. Maybe in the future it could be prompted only when the user does not provide it as env 🤷‍♂️.

Thanks for your time, and hope you will be able to fix those issues and update the README file.

Regards

---
version: "3.4"

services:
  notiondiscordbot:
    image: servatom/notiondiscordbot
    container_name: notiondiscordbot
    restart: unless-stopped
    environment:
      - PUID=1000 
      - PGID=1000 
      - TZ=Europe/Paris
      - DATABASE_TOKEN=...  # Can be removed
      - AUTH_KEY=...               # Can be removed
      - DISCORD_AUTH=...      # Need to be change to TOKEN
      - GDRIVE_FOLDER=...
      - PREFIX=!
    volumes:
      - /user/docker/notion-data:/Bot/creds
    security_opt:
      - no-new-privileges:true

prefix-bug

@raghavTinker
Copy link
Member

Hey!
So we actually changed the way this bot now works. In the new version, we decided to make one instance of the Notion-discord bot that can be used across different servers and across different notion databases. We in fact have one instance running and you can invite that bot into your server.
As for your error..well the volumes must be changed. If you look at the new docker-compose.yml file, you need to mount a database directory. Like this:
- ./database:/Bot/database. You no longer need to mount the creds.
The database folder stores a small database of the guilds that have invited the bot and their respective prefixes, notion databases, and auth key to access that database. Hence the need to mount the folder as volume for a persistent database.
We just yesterday released our version 2.0 and currently are in the process of updating the readme file. For more information please read the SETUP.md file.

@faceslog
Copy link
Author

faceslog commented Jan 2, 2022

Thanks for this really quick reply. Oh nice this is better than I expected. I just had a bad timing checking out the old README. Will try this right away and will be waiting for the official 2.0 release with the updated Readme.
Have a nice day.

@faceslog faceslog closed this as completed Jan 2, 2022
@raghavTinker
Copy link
Member

Great! I actually forgot to share the deployed bot's link. Invite this bot to your server

@raghavTinker
Copy link
Member

Hi!
We just updated the README.md file for the new version of the bot. Hope you like it!

@faceslog
Copy link
Author

faceslog commented Jan 9, 2022

Hi! We just updated the README.md file for the new version of the bot. Hope you like it!

Hey, this is perfect thanks a lot, everything is working fine 👍🏽 and it's easier than before. The only thing I keep asking myself is do you know how long does discord keep files uploaded ? I'm a bit scared that some could be deleted.

Thanks again !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants