esmBot / esmBot

A free and open-source Discord bot designed to entertain your server
https://esmbot.net
MIT License
395 stars 116 forks source link

Bot fails to successfully start and cannot interact with servers using postgreSQL #94

Closed TheGucky0 closed 3 years ago

TheGucky0 commented 3 years ago

After following all parts of the setup guide the bot fails to start with this error.

> esmbot@1.5.0 start
> node app.js

  ,---------------------------------------------------.
  |                                                   |
  |                                                   |
  |       ______                 ____        _        |
  |      |  ____|               |  _ \      | |       |
  |      | |__   ___ _ __ ___   | |_) | ___ | |_      |
  |      |  __| / __| '_ ` _ \  |  _ < / _ \| __|     |
  |      | |____\__ \ | | | | | | |_) | (_) | |_      |
  |      |______|___/_| |_| |_| |____/ \___/ \__|     |
  |                                                   |
  |                                                   |
  |                                                   |
  |                           eris-sharder 1.10.0     |
  |                                                   |
  |                                                   |
  |                                                   |
  `---------------------------------------------------'

[08:37:25] General | Cluster Manager has started!
[08:37:25] Cluster Manager | Starting 1 shards in 4 clusters
[08:37:25] Cluster Manager | Launching cluster 0
[08:37:25] Cluster Manager | Launching cluster 1
[08:37:25] Cluster Manager | Launching cluster 2
[08:37:25] Cluster Manager | Launching cluster 3
[08:37:25] Cluster Manager | Clusters have been launched!
[08:37:25] Cluster Manager | All shards spread
[08:37:25] Cluster 0 | Connecting with 1 shard(s)
[08:37:25] Cluster 0 | Shard 0 established connection!
[08:37:26] Cluster 0 | Shard 0 is ready!
[08:37:26] Cluster 0 | Shards 0 - 0 are ready!
[08:37:26] Cluster 0 | Attempting to load commands...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/8ball.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/bird.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/cat.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/cowsay.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/dice.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/dog.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/fullwidth.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/homebrew.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/mc.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/retro.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/rps.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/sonic.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/wikihow.js...
[08:37:26] Cluster 0 | Mashape/RapidAPI info not provided in config, skipped loading command ./commands/fun/wikihow.js...
[08:37:26] Cluster 0 | Loading command from ./commands/fun/xkcd.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/avatar.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/channel.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/count.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/decode.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/donate.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/emote.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/encode.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/eval.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/exec.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/help.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/image.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/imagereload.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/imagestats.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/info.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/invite.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/lengthen.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/ping.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/prefix.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/qrcreate.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/qrread.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/reload.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/restart.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/serverinfo.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/snowflake.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/soundreload.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/stats.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/userinfo.js...
[08:37:26] Cluster 0 | Loading command from ./commands/general/youtube.js...
[08:37:26] Cluster 0 | Google info not provided in config, skipped loading command ./commands/general/youtube.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/9gag.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/bandicam.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/blur.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/blurple.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/caption.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/caption2.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/circle.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/crop.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/deviantart.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/explode.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/flag.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/flip.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/flop.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/freeze.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/funky.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/gamexplain.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/globe.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/haah.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/hooh.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/hypercam.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/ifunny.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/implode.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/invert.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/jpeg.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/kinemaster.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/leak.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/magik.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/meme.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/memecenter.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/motivate.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/pixelate.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/reverse.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/scott.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/sharpen.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/shutterstock.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/slow.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/soos.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/speed.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/spin.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/stretch.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/swirl.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/tile.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/trump.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/unfreeze.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/waaw.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/wall.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/wdt.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/wide.js...
[08:37:26] Cluster 0 | Loading command from ./commands/image-editing/woow.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/loop.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/nowplaying.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/pause.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/play.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/queue.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/skip.js...
[08:37:26] Cluster 0 | Loading command from ./commands/music/stop.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/boi.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/boom.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/bruh.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/explosion.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/fakeping.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/fart.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/fbi.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/mail.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/oof.js...
[08:37:26] Cluster 0 | Loading command from ./commands/soundboard/winxp.js...
[08:37:26] Cluster 0 | Loading command from ./commands/tags/tags.js...
[08:37:26] Cluster 0 | Attempting to load 6 events...
[08:37:26] Cluster 0 | Loading event from guildCreate.js...
[08:37:26] Cluster 0 | Loading event from guildDelete.js...
[08:37:26] Cluster 0 | Loading event from messageCreate.js...
[08:37:26] Cluster 0 | Loading event from rawWS.js...
[08:37:26] Cluster 0 | Loading event from voiceChannelLeave.js...
[08:37:26] Cluster 0 | Loading event from voiceChannelSwitch.js...
[08:37:26] Cluster 0 | Successfully connected to 1 Lavalink node(s).
[08:37:26] Cluster 0 | Unhandled rejection at: Promise  [object Promise] reason:  error: permission denied for table counts
    at Parser.parseErrorMessage (/home/ava/esmBot/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/home/ava/esmBot/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/home/ava/esmBot/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/home/ava/esmBot/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:369:20)
    at addChunk (node:internal/streams/readable:313:12)
    at readableAddChunk (node:internal/streams/readable:288:9)
    at Socket.Readable.push (node:internal/streams/readable:227:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
TheEssem commented 3 years ago

Did you run GRANT ALL PRIVILEGES ON DATABASE esmbot TO esmbot; in the Postgres shell? If you ran that and it didn't work, you could try this:

\c esmbot
GRANT ALL PRIVILEGES ON guilds TO esmbot;
GRANT ALL PRIVILEGES ON counts TO esmbot;
\q
TheGucky0 commented 3 years ago

Thank you so much!, sorry im kind of a noob when it comes to SQL and all that, you're the best!

TheEssem commented 3 years ago

No problem, pinning this issue in case others run into a similar issue. :)