A cat living in SCAICT Discord server.
This project is still in beta. If you have any problem, it works on my machine.
-
Clone this repo.
-
Create Python environment in 3.11.
-
Install dependencies.
pip install flask py-cord mysql-connector-python requests
-
Config channels in
DataBase/server.config.json
. -
Run SQL Server
-
Config SQL Server in Breadcrumbs SCAICT-uwu
cog/core/sql_acc.py
-
Run Flask
flask run
-
Run main.py
python main.py
-
main.py
: Discord Bot -
app.py
: Flask web app -
generate_secrets.py
: Generate secret key for app.py. Run and save it in token.json -
Database MySQL: 使用外部伺服器,相關設定在cog/core/secret.py
-
token.json
:{ "discord_token": "", "secret_key": "", "discord_client_id": "", "discord_client_secret": "", "discord_redirect_uri": "http://127.0.0.1:5000/callback", "github_client_id": "", "github_client_secret": "", "github_redirect_uri": "http://127.0.0.1:5000/github/callback", "github_discord_redirect_uri": "http://127.0.0.1:5000/github/discord-callback" }
-
database/slot.json
:
Set the possibility for slot machine.{ "element": [ percentage, reward ] }
Made by SCAICT.