A weird school project
- Latest python
- (Recommended) sqlite for your OS
-
General Discord bot knowledge
- Create bot user
- Get bot user token
- Add bot user to server
- Add message content intent
- etc.
-
Create
bot_token.py
with the following content:token = "YOUR_TOKEN_HERE"
f
to fishinv
to access your inventorybal
orbalance
to view current gold balanceshop
for the shop help menushop <rarity>
to view sell prices of fish for a rarity
sell
to sell itemssell <amount> <fish>
sell 1 Salmon
<--- CASE SENSITIVE FISH NAME!sell fish
to sell all fishsell junk
to sell all junksell all
to sell both fish and junk
xp
to check total xprods
to viewrods all purchasable rodsbuy rod <rod name>
to buy the rod (use name given byrods
)area
to see your current areaarea <num>
to set your area
profile
to show off your profileprofile @user
to see someone else's profile
dbf.py
contains all of the database interation functions used in bot.py
. You can write your own program using these functions and basically piggyback on this database if you'd like. Keep in mind nothing is completely finished on the front-end side.
Basically:
- Read the SQL statements in db.execute() function calls
- Look at the database diagram
- ??????
- Don't understand because it's outdated
Run this to run the bot. It's as simple as that. I haven't properly formatted this file for a true discord bot developing experience, but it's functional. Realistically I should be using actual bot commands instead of looking for a certain string for every message a user sends. Oh well.
- SQL script generator
- fix terrible string replace
So, there's a script called gen_sql.py
in this repo. If you want the SQL DROP/CREATE for the database, run it. Oh, before you run it...
Look for the section configurables near the top of the script
- Set True if you want changes to be committed to the
fisherbot.db
file - Set False if you do not want any changes to be committed to
fisherbot.db
- set True if you want the SQL script to be output to stdout
- this is useful if you want to pipe the script into something, or write it to a single file directly from the command line
- set False to keep the normal verbose/debug outputs
- set True if you want individual SQL scripts for each table to output to
./sql/
- set False if you do not want scripts to be output
- set True to include USER DATA CONTAINING TABLES in the script
- set False to avoid USER DATA CONTAINING TABLES in the script