Skip to content

tinfoilboy/wurlitzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wurlitzer

A simple Discord bot for grabbing statistics for a Last.fm user. Associate your Last.fm account with the bot and make subsequent calls to grab your stats.

Usage

To begin using the bot, register a custom application for your bot instance on the Discord Developers page. Once you've finished that and gotten a key for your bot user, make a .env file in the root with the following key:

DISCORD_BOT_KEY=<your bot key here>

Next, register for a Last.fm API application here. Take the key from registering the application and place it as well as the secret into the .env file like the following:

LAST_FM_API_KEY=<your key here>
LAST_FM_API_SECRET=<your secret here>

Next step is to initialize the database, do this by running the database.py file, which will run the commands in the schema.sql file. Additionally, if you have a database already from the initial release of wurlitzer, this file will migrate to the new schema for the bot.

Once you are done, just run the script and enjoy the bot!

Commands

For each command through the bot, you must mention it. To begin using the bot with Last.fm, mention the bot and use the set username command, like the following

@<bot name> set username <last.fm username>

This creates an association between your Discord account and the Last.fm account specified. To get your Now Playing from Last.fm, just mention the bot with no arguments, like below:

@<bot name>

This gives a rich card to what song is currently playing.

You can also get a 3x3 chart of your top albums of the week with the following command

@<bot name> chart

Other Contributors

Opalmine - Wurlitzer Icon Art

Releases

No releases published

Sponsor this project

 

Packages

No packages published