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

Restyle Update to CPython 3.12 #160

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading