Ratismal / UNO

An uno discord bot
70 stars 36 forks source link

go here for example config file #11

Closed Puyodead1 closed 2 years ago

Puyodead1 commented 5 years ago

need config.json

Mte90 commented 2 years ago

yes the file is missing or in the readme

Mte90 commented 2 years ago

Sorry I don't understand why it is closed as the config.json is still missing

Puyodead1 commented 2 years ago

Never gonna get a config, it's been 3 years

Mte90 commented 2 years ago

But if I want to try the bot as it is now without a config it is impossible. I can understand from the code the parameters but I have no idea of the data format of them.

Mte90 commented 2 years ago

any news? it is not possible to use the bot without the config file also if it is open source.

Puyodead1 commented 2 years ago
{
  "token": "bot token",
  "oauth": {
    "id": "client id",
    "redirect": "http://localhost:8108/callback",
    "secret": "client secret",
    "authSecret": "someamazingsecret"
  },
  "shard": 0,
  "prefix": "uno",
  "shards": {
    "max": 1,
    "perCluster": 1
  }
}
Puyodead1 commented 2 years ago

almost forgot, heres an example of the database config from config/config.json using SQLite

{
  "production": {
    "username": null,
    "password": null,
    "database": "sqlite::memory:",
    "host": null,
    "dialect": "sqlite",
    "storage": "database.sqlite"
  },
  "development": {
    "username": null,
    "password": null,
    "database": "sqlite::memory:",
    "host": null,
    "dialect": "sqlite",
    "storage": "database.sqlite"
  }
}

you can find other information for other databases at https://sequelize.org/master/manual/getting-started.html

Mte90 commented 2 years ago

The readme in the selfhost doesn't specify the requirements. I didn't knew that needed postgre as database. It is possible to explain what are the the dependencies to configure?

Also what are the discord permission required to use it?

Puyodead1 commented 2 years ago

The readme in the selfhost doesn't specify the requirements. I didn't knew that needed postgre as database.

It is possible to explain what are the the dependencies to configure?

Also what are the discord permission required to use it?

Where did you read that Postgres is the only available database? Sequalize supports many different database types including mysql and mongodb and sqlite

As far as permissions, probably just send messages

Mte90 commented 2 years ago

This line https://github.com/Ratismal/UNO/blob/master/package.json#L23 as it is a package for postegresql https://www.npmjs.com/package/pg

But I am trying to understand the oauth2 part in the config if it is needed.

Puyodead1 commented 2 years ago

This line https://github.com/Ratismal/UNO/blob/master/package.json#L23 as it is a package for postegresql https://www.npmjs.com/package/pg

But I am trying to understand the oauth2 part in the config if it is needed.

The author chose to use Postgres so they installed the Postgres package. I chose to use sqlite so I installed the sqlite3 package. see the link in my database config comment about the different databases. The oauth stuff is needed if you want the website part to work

Mte90 commented 2 years ago

Ok, now starts (I will remove the oauth stuff as I don't needed it).

I get this error:

 00  12/20 14:50:53   error    Issue restoring old games: 
 SequelizeDatabaseError: SQLITE_ERROR: no such table: channels
    at Query.formatError (/opt/UNO/node_modules/sequelize/lib/dialects/sqlite/query.js:423:16)
    at afterExecute (/opt/UNO/node_modules/sequelize/lib/dialects/sqlite/query.js:119:32)
    at Statement.errBack (/opt/UNO/node_modules/sqlite3/lib/sqlite3.js:14:21)

Also it is required inside the bot on developer discord enable the Intents.

Mte90 commented 2 years ago

Ok it is required to run npx sequelize-cli db:migrate to initialize the database.

Mte90 commented 2 years ago

I think that can be closed now with the new readme

Puyodead1 commented 2 years ago

Hehe, only took 4 years :P thanks