ishwi / Chuu

Last.fm bot for discord
MIT License
173 stars 20 forks source link
discord discord-bot discord-server java java-17 jda jda-bot jda-discord-bot last-fm lastfm lastfm-api mariadb musicbrainz stats

Chuu

Chuu is a Discord bot that integrates Last.fm with Discord. Highly customizable at the user and server level. It also has some unique integrations with RateYourMusic.com. There are a ton of available commands like:

Invite Link

You can invite the bot to your discord server using this link:

There is also a support server if you want to ask any questions directly. Join here:

Set-Up

You can also build the bot and install it on your own. In order to do that you need:

Then you should set all those properties in the file all.properties

In MariaDB you should first create a database within MariaDB, and then inside that database run first the following SQL script, and then all the sql scripts under migrations sequentially

Finally adjust the datasource.properties with the corresponding properties.

For Postgres first check the Musicbrainz section. Once that is done you should run the following SQL script and adjust the mbiz.properties with the corresponding properties.

If you are interested in posting info of the bot to a given botlist, fill the file botlists.properties. The keys are specified in BotLists.java

Musicbrainz Database

For Postgresql I would recommend you to use mbdata to set up the musicbrainz database. Then adjust the mbiz.properties with the corresponding properties. WARNING: It's like a 30GB database, so take note. It's recommended to set normal and lowercase indexes on artist and album names to optimize some queries. Also, the pg_trgm extension should be enabled.

You have two options if you don't want to set up the whole musicbrainz instance:

Both this options will result on a lot of commands misbehaving and these options are not fully supported and a lot of errors can be produced because of that so please be aware of that!.

Running

After all that is installed you can run the task shadowjar of gradle and then you can execute, with executable being the name of the jar that is on build/libs

java -jar executable.jar

and the bot should begin running.

Test

Currently not working

If you were to do testing you should also fill the equivalent all.properties of the test module and also fill the tester.properties with a new Discord bot token that will be used for testing, the ID of the Discord server where the testing will take place and the ID of a user present in that server.