#Discord Bot Template

1 messages · Page 1 of 1 (latest)

hallow brook
#

Failed to deploy

Docker Error: Preparing for build ...
Building ...

added 6 packages, and audited 7 packages in 2s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice 
npm notice New major version of npm available! 7.10.0 -> 10.1.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.1.0>
npm notice Run `npm install -g [email protected]` to update!
npm notice 

> [email protected] setup
> node src/setup.js

file:///usr/local/build/src/setup.js:13
  const response = await fetch(registerApi, {
                         ^

TypeError: fetch is not a function
    at setup (file:///usr/local/build/src/setup.js:13:26)
    at file:///usr/local/build/src/setup.js:32:1
    at ModuleJob.run (node:internal/modules/esm/module_job:175:25)
    at async Loader.import (node:internal/modules/esm/loader:178:24)
    at async Object.loadESM (node:internal/process/esm_loader:68:5)
river nova
hallow brook
#

okay let me try it

hallow brook
#

I added it in .env file. do i need todo anything else?

hallow brook
#

okay, it's now deployed successfully, but i'm getting other error.

river nova
hallow brook
#

while adding my function url as Interaction Link in discord.

river nova
hallow brook
#

this is what URL looks like
https://6516....ad42.api.panara.studio/interactions

#

of my cloud functions

river nova
#

do you have a reverse proxy setup on your machine?

river nova
# hallow brook

if you visit this link in the browser, does it work as expected?

hallow brook
hallow brook
#

I'm using discord bot templete from appwrite functions

river nova
#

yeah that’s because you don’t have anything telling the browser where to go

#

one sec

hallow brook
#

oh okay

river nova
#

NPM is Nginx Proxy Manager in this case

hallow brook
#

okay, so what do i need todo?

river nova
#

How did you setup Appwrite on your machine?

#

Did you install and set it up with Docker, or one of the one-click installs?

hallow brook
#

it's self hosted instance with docker on VPS KVM

hallow brook
river nova
#

Once you have this setup, you can create a Proxy Host for *.api.panara.studio

hallow brook
#

okay, why do i need that reverse proxy?

#

I'm new to this all, so asking.

restive edge
hallow brook
#

okay let me try that

hallow brook
#

and this is error i'm getting from cloud function.

hallow brook
#

is it due to ssl certificate? but it says ceritificate generated on appwrite console.

restive edge
restive edge
restive edge
restive edge
hallow brook
hallow brook
restive edge
#

would you please try logging the following before the verifyKey() call:

req.headers['x-signature-ed25519']
req.headers['x-signature-timestamp']
process.env.DISCORD_PUBLIC_KEY