Skip to content

Commit

Permalink
Restyle Update to CPython 3.12 (#160)
Browse files Browse the repository at this point in the history
Restyled by prettier-markdown

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
restyled-io[bot] and restyled-commits authored May 13, 2024
1 parent 3430d1f commit 47e1de5
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@ Here are the steps to host your copy of [this bot.](https://github.com/Tech-TTGa
3. Ensure that python3.12 is installed and available, same for pip.
4. Run `curl -sSL https://install.python-poetry.org | python3 -`. And follow instructions provided there.
- Change some poetry settings as-needed. You can add the `--local` flag to set those settings only to the current directory
- `poetry config virtualenvs.in-project true` installs the virtual environment in the project, not in a poetry-specific location (recommended).
- `poetry config virtualenvs.in-project true` installs the virtual environment in the project, not in a poetry-specific location (recommended).
5. Run `poetry install`
- Depending on the DB used, add `-E pgsql` or `-E sqlite`
- If you want development packages, add `--with dev`
6. Install PostgreSQL. [Guide Here](https://www.postgresql.org/download/)
1. Set up automatic PostgreSQL startup on [Linux](https://www.postgresql.org/docs/current/server-start.html) and for windows just start it via `services.msc`
2. Set up user and database for the bot. `<FIELD>` are required and to be replaced with your stuff. [FIELD] are optional and can be ignored.
- Linux:
1. `sudo -u postgres -i`
2. `createuser --pwprompt <dbuser>`
The prompt will ask you for a password for new user - `<dbpass>`.
3. `createdb -E UTF8 -O <dbuser> <dbname> [comment]`
`<dbuser>` being the same as in the previous step.
1. `sudo -u postgres -i`
2. `createuser --pwprompt <dbuser>`
The prompt will ask you for a password for new user - `<dbpass>`.
3. `createdb -E UTF8 -O <dbuser> <dbname> [comment]`
`<dbuser>` being the same as in the previous step.
- Windows:
1. If the installed PostgreSQL bin isn't in PATH, use `cd` to go to the installation bin.
2. `createuser --pwprompt -U postgres <dbuser>`
The prompt will ask you for the password of the postgres user and the password for the new user - `<dbpass>`.
3. `createdb -E UTF8 -O <dbuser> -U postgres <dbname> [comment]`
`<dbuser>` being the same as in the previous step.
1. If the installed PostgreSQL bin isn't in PATH, use `cd` to go to the installation bin.
2. `createuser --pwprompt -U postgres <dbuser>`
The prompt will ask you for the password of the postgres user and the password for the new user - `<dbpass>`.
3. `createdb -E UTF8 -O <dbuser> -U postgres <dbname> [comment]`
`<dbuser>` being the same as in the previous step.
3. Fill out config.json based on the database config environment. (refer to example_config.json)
- Don't change “dbtype” unless you're using SQLite.
- Unless you are using a remote server/changed config, don't touch “dbhost” and “dbport”.
Expand All @@ -100,9 +100,10 @@ Here are the steps to host your copy of [this bot.](https://github.com/Tech-TTGa
- The path is just `/`.
9. Copy your _main_ guild ID and paste it into config.json under "dev_guild_id". This will enable the dev commands in your server. (Required)
10. Start your bot! Use `poetry run start` or after activating venv (if present) `python3 /tickets_plus/`
- Probably add a background service that will restart the bot on boot. _I use systemd for my bots._
11. Finally send `<bot ping> sync` in the bot's DMs to sync / commands.

- Probably add a background service that will restart the bot on boot. _I use systemd for my bots._

11. Finally send `<bot ping> sync` in the bot's DMs to sync / commands.

[^1]: This bot is not affiliated with the Tickets Bot team. When a feature is added to the main bot, any feature that is no longer needed will be discontinued here.
[^0]: [Tech-TTGames](https://github.com/Tech-TTGames), I'm the only one here right now. I had some help in general, but I'm the only one who has done any coding. More people are welcome to join. I had help with organization and checking my code from [kk5dire](https://github.com/kk5dire) and [Ben Foster](https://github.com/benfoster04) with hosting and some documentation changes.
Expand Down

0 comments on commit 47e1de5

Please sign in to comment.