Skip to content

nmuntaaza/Radio-Bot

Wednesday-Bot

This bot main purpose is to play radio on discord. This bot used for my personal discord guild so i may add another feature such as get meme from reddit.

Local Setup

To run this bot locally:

  1. Install Node.js if you don't have them already. (I recommend install it with nvm)

  2. Clone this repository:

    $ git clone https://github.com/nmuntaaza/Wednesday-Bot.git
  3. cd to the repository directory and run the following command:

    $ cd Wednesday-Bot
    $ npm i
  4. Rename .env.sample to .env

  5. If you doesn't have discord bot token:

    • Open Discord Developer.
    • Create new application.
    • When done use should be in your application information, open Bot sidebar.
    • Click add bot and click yes.
    • Click copy to copy your token.
  6. Paste your token on field TOKEN on .env file.

  7. Fill other field.

  8. Run your bot:

    $ npm run start
  9. Get your bot client id from your application in Discord Developer.

  10. Invite your bot with:

    https://discord.com/api/oauth2/authorize?client_id=<your_bot_client_id>&permissions=3668032&scope=bot
    

Database

I use mongodb atlas to store my radio, to set up your database you can read tutorial to setup a free cluster in mongodb atlas.

Database Name: wednesday Collection radio JSON structure:

{
   "_id": {
      "$oid": "5f1c373291b9e39487b68055"
   },
   "url": "http://ice-the.musicradio.com:80/LBC973MP3Low",
   "name": "LBC",
   "genre": "",
   "lang": "EN"
}

Collection states JSON structure:

{
   "_id": "5251183704214077xx", // Guild ID
   "lastMemeSubReddit": "",
   "maxPageList": 10,
   "radioPlayTimeout": 6,
   "radioPagination": 0,
   "prefix": "!",
   "currentPlayed": ""
}

Collection user_radio JSON structure:

{
   "_id": {
      "$oid": "5f1cd9651020bf1af7e80e20"
   },
   "url": "http://listento.ardanradio.com:1059/stream/1/",
   "name": "Ardan",
   "genre": "",
   "lang": ""
}

About

Wednesday-Bot is a discord bot that playing radio, with another feature

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •