A discord bot made in Python to bring Steam API features into Discord. Slash commands are used to interact with the bot.
/ping
Displas the bot's ping to discord.
/csnews
Brings up the the frontpage CS:GO news, with two buttons to browse older news.
/profile STEAMID
/profile CUSTOM_URL
Displays basic profile information and the oldest friends of a public steam account.
/banstatus STEAMID
/profile CUSTOM_URL
Calculates the total inventory value and displays the 5 most valuable items.
After cloning the project, create a ./keys/ directory with discord.key
and steam.key
files. Discord.key will contain the discord bot token, and the steam.key file will have the steam API key acquired here
For Linux/OS X, run the following command in the project folder to create the required Docker image.
docker run -p 5432:5432 -d -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=my-db -v pgdata:/var/lib/postgresql/data --name first_pg postgres
Next, run the following to enter the postgres instance.
docker exec -ti first_pg psql -U postgres
In the PSQ, run the command \c postgres
And finally, run the following command to create the database.
CREATE TABLE steam_data(
discord_id varchar(50) NOT NULL PRIMARY KEY,
steam_id varchar(50) NOT NULL);
You can now delete the postgres instance and image. The volume "pgdata" should be ready.
You can use docker-compose up
to run the bot.