Skip to content

ahmetmutlugun/vapor

Repository files navigation

Codacy Badge GitHub Workflow Status
GitHub commit activity GitHub code size in bytes
GitHub Repo stars

Steam Discord Bot

A discord bot made in Python to bring Steam API features into Discord. Slash commands are used to interact with the bot.

Commands

Ping

/ping
Displas the bot's ping to discord.

CS:GO News 📰

/csnews

Brings up the the frontpage CS:GO news, with two buttons to browse older news.
profile

Profile 🗄

/profile STEAMID /profile CUSTOM_URL

Displays basic profile information and the oldest friends of a public steam account.
profile

Inventory 🧮

/banstatus STEAMID /profile CUSTOM_URL

Calculates the total inventory value and displays the 5 most valuable items.
inventory

Setup

Requirements

Docker and docker-compose

Installation

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.