A Discord Bot that uses the Radio Garden API for listening to radio stations worldwide

Overview

radio_garden

coverage style: very good analysis License: MIT

Generated by the Very Good CLI ๐Ÿค–

A Dart app that uses the [Radio Garden API][radio_garden_api] to play radio stations from around the world in your Discord server.


Getting Started ๐Ÿš€

Getting environment variables

bash get_environments.sh

Running the server on Docker

bash relaunch_prod.sh #Or relaunch.sh if working in dev

Running the server on a Dev Container โšก

By running the server in a dev container you'll be able to use zsh and you'll not need to wait for docker to rebuild every time you want to test a change in the code.

  • Install Dev Containers in VS Code.
  • Press F1 and run Rebuild and Reopen in container.

From there you can run:

dart bin/radio_garden_development.dart

Running Tests with coverage ๐Ÿงช

To run all unit tests use the following command:

$ dart pub global activate coverage 1.2.0
$ dart test --coverage=coverage
$ dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info

To view the generated coverage report you can use lcov .

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

Comments
  • feat: radio song recognition

    feat: radio song recognition

    This PR adds song recognition feature:

    • Add SongRecognitionService
    • Add recognise to the /radio commands, now we can use /radio recognise to see what song is there
    opened by jorger5 6
  • feat: song recognition shazam

    feat: song recognition shazam

    Status

    READY

    Description

    This PR adds a song recognition feature:

    We landed on the service https://rapidapi.com/mirzahadjaevaguzal/api/shazam-song-recognizer, which gives us all the needed details for the current playing song. Screenshots are attached at the bottom.

    • Add SongRecognitionService
    • Add recognize to the /radio commands; now we can use /radio recognize to see what song there is
    Images

    image image image image

    Type of Change

    • [x] โœจ New feature (non-breaking change which adds functionality)
    • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [x] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [ ] ๐Ÿ—‘๏ธ Chore
    enhancement 
    opened by tomassasovsky 2
  • feat: database integration

    feat: database integration

    We can use https://github.com/nyxx-discord/running_on_dart.git as a template, as it already has an implementation with PostgreSQL. They're using a custom-made migration tool, which can be found here: https://github.com/nyxx-discord/migent.git

    enhancement 
    opened by tomassasovsky 2
  • command: song recognition

    command: song recognition

    The command should be equipped to identify the song that's currently playing, along with checks to ensure the user is playing a radio. Also, think of scalability when implementing this, as we'll need to, later on, implement membership plans to make this a premium feature.

    It should be under the /radio ChatGroup, as recognise

    enhancement 
    opened by tomassasovsky 1
  • service: song recognition

    service: song recognition

    This service should be two-fold:

    • It should be able to generate a file from a specified radio id, containing only a few seconds (3 is recommended) of the radio. This file should be stored in the temporary directory, as it will be rendered useless after we pass it to the song recognition portion.
    • It should be able to recognise a song from a file's content buffer.
    enhancement 
    opened by tomassasovsky 1
  • feat(command-info): gateway latency added

    feat(command-info): gateway latency added

    Status

    READY

    Description

    • Adds the "Gateway Latency" translations.
    • Adds to the /info command the gateway latency.
    • Closes #13

    Type of Change

    • [x] โœจ New feature (non-breaking change which adds functionality)
    • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [ ] ๐Ÿ—‘๏ธ Chore
    enhancement 
    opened by tomassasovsky 0
  • fix(build): old dependency causing failure in build

    fix(build): old dependency causing failure in build

    Status

    READY

    Description

    Fixes the build for releases, as the old version of nyxx_commands used an old version of analyzer, causing conflicts with other dependencies which used the latest version of analyzer.

    Type of Change

    • [ ] โœจ New feature (non-breaking change which adds functionality)
    • [x] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [ ] ๐Ÿ—‘๏ธ Chore
    bug 
    opened by tomassasovsky 0
  • feat(info-command): add current players field

    feat(info-command): add current players field

    Adds the current players field to the info command of the bot.

    Status

    READY

    Description

    Type of Change

    • [x] โœจ New feature (non-breaking change which adds functionality)
    • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [ ] ๐Ÿ—‘๏ธ Chore
    enhancement 
    opened by tomassasovsky 0
  • feat: translations in english and spanish

    feat: translations in english and spanish

    Status

    READY

    Description

    Adds translations for all commands, services, and error handlers which need it in Spanish and English.

    Type of Change

    • [x] โœจ New feature (non-breaking change which adds functionality)
    • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [ ] ๐Ÿ—‘๏ธ Chore

    Translations working! image

    enhancement 
    opened by tomassasovsky 0
  • feat: database integration

    feat: database integration

    Status

    READY

    Description

    This only includes the connection to the database.

    Type of Change

    • [x] โœจ New feature (non-breaking change which adds functionality)
    • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [x] ๐Ÿ—‘๏ธ Chore
    enhancement 
    opened by NazarenoCavazzon 0
  • chore(hooks): pre-commit and commit-msg

    chore(hooks): pre-commit and commit-msg

    Status

    READY

    Description

    This PR includes hooks for ensuring we uphold standards even before we commit.

    Type of Change

    • [ ] โœจ New feature (non-breaking change which adds functionality)
    • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
    • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] ๐Ÿงน Code refactor
    • [ ] โœ… Build configuration change
    • [ ] ๐Ÿ“ Documentation
    • [x] ๐Ÿ—‘๏ธ Chore
    chore 
    opened by tomassasovsky 0
  • feat: premium membership

    feat: premium membership

    The premium membership system shall be implemented with the Stripe payments system.

    • [ ] Free tier will give 50 song recognition credits to a server per month.
    • [ ] Server-Paid* tiers will give every WHITELISTED user in a server the ability to recognise songs for:
      • [ ] Pro $2.49 a month for 4500 credits a month
      • [ ] Absolute $5.99 a month for 15000** credits

    In all cases, one credit equals one songย recognition.

    *Include discount codes for the first six months of the offering. Annual payments will have a 20% discount. **15000 is essentially unlimited, as radios will only play as many as 10,800 songs per month.

    enhancement chore 
    opened by tomassasovsky 1
Releases(v0.1.0+1)
  • v0.1.0+1(Dec 12, 2022)

    What's Changed

    • chore: added github templates by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/37
    • feat: song recognition shazam by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/38
    • chore(hooks): pre-commit and commit-msg by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/40
    • feat: database integration by @NazarenoCavazzon in https://github.com/tomassasovsky/radio-garden.dart/pull/42
    • feat: translations in english and spanish by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/43
    • feat(info-command): add current players field by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/44
    • fix(build): old dependency causing failure in build by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/46

    Full Changelog: https://github.com/tomassasovsky/radio-garden.dart/commits/v0.1.0+1

    Source code(tar.gz)
    Source code(zip)
  • v0.0.1-alpha(Nov 20, 2022)

    This release contains the following:

    • Music commands (play, stop, pause, resume, leave, join).
    • Radio commands (play -- for everything else, we can use music's commands).
    • Info command (gives out information to the user about the bot's data. Quantity of guilds, users, channels, voice states, shards, memory usage, and uptime.)

    Although this will be publicly available for usage, it is only in alpha, meaning it is still not stable.

    What's Changed

    • feat: added docker production settings by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/5
    • fix: guildId breaking production by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/6
    • Bump docker/metadata-action from 3.3.0 to 4.1.1 by @dependabot in https://github.com/tomassasovsky/radio-garden.dart/pull/1
    • Bump docker/build-push-action from 2.5.0 to 3.2.0 by @dependabot in https://github.com/tomassasovsky/radio-garden.dart/pull/2
    • Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/tomassasovsky/radio-garden.dart/pull/3
    • Bump docker/login-action from 1.10.0 to 2.1.0 by @dependabot in https://github.com/tomassasovsky/radio-garden.dart/pull/4
    • update: dockerignore by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/7
    • fix: now specifying the entry file from the docker-compose file by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/8
    • feat: production dockerization by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/9
    • feat: replacing tracks with radio when played, and added handler for track events by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/10
    • fix: waiting 5 minutes before destroying the player after all tracks have finished by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/11
    • Shell scripts for UNIX by @jorger5 in https://github.com/tomassasovsky/radio-garden.dart/pull/14
    • feat: setup for development environment by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/20
    • refactor: remove unused dependencies and converters by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/21
    • feat: base for song recognition--including demo scripts and data models. Missing service and command by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/12
    • Dev workspace working ๐Ÿ˜Ž by @NazarenoCavazzon in https://github.com/tomassasovsky/radio-garden.dart/pull/23
    • feat: autocomplete for radio by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/25
    • fix: /info command type error by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/29
    • fix: ci build workflows by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/30
    • feat: analytics by @tomassasovsky in https://github.com/tomassasovsky/radio-garden.dart/pull/31

    New Contributors

    • @dependabot made their first contribution at https://github.com/tomassasovsky/radio-garden.dart/pull/1
    • @jorger5 made their first contribution at https://github.com/tomassasovsky/radio-garden.dart/pull/14
    • @NazarenoCavazzon made their first contribution at https://github.com/tomassasovsky/radio-garden.dart/pull/23

    Full Changelog: https://github.com/tomassasovsky/radio-garden.dart/commits/v0.0.1-alpha

    Source code(tar.gz)
    Source code(zip)
Owner
Software developer @sportsvisio Like what I do and want to help me have more time for contributions? Buy me a coffee! buymeacoffee.com/tomassasovsky
null
flutter record mp3 using the native api

Record Mp3 Record an MP3 using the platform native API Depend on it Add this to your package's pubspec.yaml file: Flutter <= 1.19.x dependencies: re

FlutterCandies 32 Dec 22, 2022
A Gif Finder made with Flutter and API from GIPHY.

Gif Finder Topics ?? About ?? Preview ?? Challenges and Learnings along the way ?? How to Use ?? How to Contribute ?? License ?? About ?? A simple Gif

Felipe Sales 8 May 31, 2022
Flutter plugin for playing or streaming YouTube videos inline using the official iFrame Player API.

Flutter plugin for playing or streaming YouTube videos inline using the official iFrame Player API. The package exposes almost all the API provided by iFrame Player API. So, it's 100% customizable.

Sarbagya Dhaubanjar 558 Jan 2, 2023
โ€Žโ€Žโ€Žโ€Žโ€ŽCreate a serverless Discord bot in pure dart using Discord Interactions webhooks

Create a serverless Discord bot in pure dart using Discord Interactions webhooks Features Feature Status Manage Application Commands Full support (uni

null 4 Sep 28, 2022
A discord bot, made with Dart, which lets you run your own pure Dart code snippets directly via a discord ping, and get the output in an instant.

A discord bot, made with Dart, which lets you run your own pure Dart code snippets directly via a discord ping, and get the output in an instant.

Anikate De 3 Oct 21, 2022
A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a discord bot. It can link multiple farmers/harvesters to your account.

farmr A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a di

Gil Nobrega 261 Jan 2, 2023
A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a discord bot. It can link multiple farmers/harvesters to your account.

farmr A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a di

Gil Nobrega 261 Nov 10, 2022
Dot-Net-Inverview-Bot - Dot net interview questions answering by bot built with flutter

Dot Net Interview question Answering Bot Dot net interview questions answering b

Maddi Mahesh 5 Feb 2, 2022
Radiao - a radio explorer app that lets you listen to several stations of various countries

radiao Radiao is a radio explorer app that lets you listen to several stations of various countries. features trending stations popular stations liste

null 4 Apr 20, 2022
The application contains the Noble Qurโ€™an, Qurโ€™an radio stations, morning and evening remembrances, and some supplications that a Muslim needs in his life, as well as prayer times, the direction of the qiblah, and the Forty-Nawawi book

The application contains the Noble Qurโ€™an, Qurโ€™an radio stations, morning and evening remembrances, and some supplications that a Muslim needs in his life, as well as prayer times, the direction of the qiblah, and the Forty-Nawawi book

Mohamed Ayad 14 Dec 15, 2022
It is a Flutter mobile and web application that allows you to search for universities worldwide by name and country.

Search Universities App It is a Flutter mobile and web application that allows you to search for universities worldwide by name and country. Data sour

Enes 1 Feb 4, 2022
Radiocom-flutter - This is an Flutter application for Community Media Stations.

radiocom-flutter This is a flutter application for Community Media Stations based in radioco APIs. Getting Started This app is supposed to be configur

Fernando Souto Gonzalez 60 Oct 24, 2022
An API Client for Discord, written in Dart.

discord_api_client An API Client for Discord, written in Dart. Features TODO: List what your package can do. Maybe include images, gifs, or videos. Ge

null 1 Feb 15, 2022
A curl-like client for the Discord API

durl A curl-like command-line client for Discord bot and user APIs. Features Bot auth flow User Oauth2 flow (redirects to http://localhost:3000) get,

Luke Pighetti 3 Nov 8, 2022
A radio component suitable for almost any radio scenario.

fradio A radio component suitable for almost any radio scenario. Supports excellent interactive special effects, as well as a simple multi-interactive

Fliggy Mobile 75 Nov 26, 2022
A radio player mobile application which streams audio from Radio Sai Global Harmony.

Sai Voice A radio player which streams audio from Radio Sai Global Harmony. *Special Thanks to Aman Achutan for the logo Om Sri Sai Ram ?? Sai Voice i

Sai Rajendra Immadi 11 Nov 26, 2022
a Flutter based - Open Source Listening Experience Training App

eqTrainer Open-source listening experience trainer, Powered by Flutter. Overview eqTrainer is a Flutter-based, Open-source Listening Experience traini

Lee Jinwoo 4 Mar 2, 2022
Command line application for listening Telemetry data from F1 2021 game

Command line application for listening Telemetry data from F1 2021 game

Ensar Emir EROL 3 Mar 12, 2022
An app that randomly draws Japanese vocabularies from N5 to N1 level to test your listening skill, providing pronunciation and answer checking.

An app that randomly draws Japanese vocabularies from N5 to N1 level to test your listening skill, providing pronunciation and answer checking.

Eric Lau 13 Jul 17, 2022
Flutter package for listening SMS code on Android, suggesting phone number, email, saving a credential.

Flutter Smart Auth From Tornike & Great Contributors Flutter package for listening SMS code on Android, suggesting phone number, email, saving a crede

Tornike 16 Jan 1, 2023