Coder Social home page Coder Social logo

avaire / avaire Goto Github PK

View Code? Open in Web Editor NEW
91.0 15.0 109.0 10.18 MB

A multipurpose Discord bot made for fun

Home Page: https://avairebot.com/

License: GNU General Public License v3.0

Java 99.78% Batchfile 0.06% Shell 0.14% Dockerfile 0.02% Procfile 0.01%
java jda jda-bot java-8 discord-bot discord-java avaire bot

avaire's Introduction

TeamCity Simple Build Status AvaIre Version AvaIre Code Coverage Discord GitHub

AvaIre AvaIre

About AvaIre

AvaIre is a multipurpose Discord bot made for fun, written in Java 8, using the JDA library.

Main features

  • Music streaming from YouTube, SoundCloud, Twitch etc.
  • Custom music playlists that you can play anytime
  • Moderation commands (Ban, kick, slowmode)
  • Search for comics and reaction gifs
  • Extended server functionality (Welcome messages, server and user info)
  • High level of customization
    • Changing messages on a per-server basis
    • Change the languages Ava uses
    • Create custom aliases for existing commands
    • Change the prefix ava uses on a per-module basis
  • And more, check the full command reference for all the commands!

Visit our website for more information.

Deploy AvaIre on Heroku

You can deploy in a simple way to Heroku using the button below.

Deploy to Heroku

Before deploying, read the configuration guide, aswell as the guide regarding hosting with Heroku.

Contributing

Thank you for considering contributing to AvaIre! The contribution guide can be found in the AvaIre documentation.

License

AvaIre is open-sourced software licensed under the GNU General Public License v3.0.

Third Party Licenses

AvaIre relies on the following projects:

Name License
JDA (Java Discord API) Apache License 2.0
LavaPlayer - Audio player library for Discord Apache License 2.0
google-gson Apache License 2.0
Apache Commons Apache License 2.0
SnakeYAML Apache License 2.0
Prometheus Apache License 2.0
DialogFlow SDK (Previusly api.ai) Apache License 2.0
MySQL Connector/J GNU General Public License v2.0
logback-classic Eclipse Public License v1.0 and
GNU Lesser General Public License version 2.1
Sentry SDK for Java BSD 3-clause "New" or "Revised" License
jsoup: Java HTML Parser MIT License
emoji-java MIT License
EvalEx - Java Expression Evaluator MIT License
Reflections Do What The F*ck You Want To Public License

Discord server
AvaIre support server: https://avairebot.com/support

avaire's People

Contributors

a2937 avatar abhishekd-1 avatar alex-taxiera avatar avaire-translations avatar basketbandit avatar boafur avatar braktar avatar chancharge avatar chao-chan avatar codixer avatar elyssen-1 avatar julianotten avatar lessvoice avatar macleykun avatar pypj0208 avatar rammahh avatar ryo567 avatar senither avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avaire's Issues

Reaction roles do not work on servers set with type 1 or 2

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

When the server is set to type 1 or 2 (VIP and VIP+), reaction roles won't work. Ava just takes the command and doesn't post a reaction.

Adding Enviorment Variables

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

As discussed in private. Adding support to use environment variables aside from using the config.yml file. This would enable users to use this form instead. Also to host more effectively on Heroku. It's recommended to use environment variables, as you can't edit the configs after deploy in Heroku.

After this is implemented. I will create the app.json that users can use to deploy even easier to Heroku.
Oh, and for the mysql variable, i would suggest the following:
JAWSDB_URL mysql://zzalgkr5nnk77a7w:xqlnyz34bf71n7a9@vhw3t8e71xdz9k14.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/nt3bciiyffgc1ms1
If the above env variable type could be added aswell. Users won't have to edit/config anything related to mysql!

French version

General Troubleshooting

Hey it's very cool to have french languages in avaire bot

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Replace this sentence with a description and include as many details as you think are needed to understand your issue.

Global Ban command suggestion.

Feature Request
A Globalban command (system command)

Description

So if there is this one person who should not be in any guilds (servers) the bot is in and you are the owner of the bot you could do [systemprefix]globalban [id] [reason] and it bans that user.

Command Requests = Compatibility, Games, Actions.

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER
[Y] means Yes

Description

So basically compatilibility is like shipping. To test how well you and someone else you specify would do as a couple. [as a jooke.] Ranging from 0% to 100%. It'd not only allow actual users in the server, but other names like ex. Derp [whos not in a server] x Derp 2 [also not in server]. Kinda like that. And games will entertain people. Such as Russian Roulette, playing with other friends, or even battles. And actions are gifs that show that same action. EX. someone slapping someone, showing a gif of someone slapping another person in anime, etc.

Command suggestion: Level Role Hierarchy

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

!hierarchy

Turns on role managing in the level system.

How things are now:

If you get roles based on level, it keeps adding roles, without automagically removing them.

The future:

With hierarchy, the bot should understand that if you have automatic in assigning roles at level 5, 10 and 15. It will then as the user hits level 10, give the user the lvl 10 role and removing the lvl 5 role. Etc... continuing all the way.

Optional:

Set level scope of hierarchy command. hierarchyrange

Ava assings roles @ lvl 5, 10, 50 and 100. I have some basic permissions tied into the lvl 5 and 10 role, so I want the users to keep those.

!hierarchyrange 50 100

^ This makes all roles distributed within 50 to 100 range removed when the next rank is added. If I add a new level 70 role, Ava should catch that and remove the 50 role for people equal or higher than 70, unless their 100.


Suggestion was orginally made by kazasho#1 (ID: 218792916729069569) from the AvaIre Central server.

Avalre is mute when the music starts

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

Issue

With the !play command Avalre joins, she writes down the Now playing message, but she is mute. (Tested on more servers with the right permissions and she isn't muted/server muted)

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://avairebot.com/support

Self-Assignable roles through reactions

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Create a command that can be used to send a messages through the bot, the message will have some reactions attached to it, when a user reacts to the message using one of the reactions, the user will be given a role that was linked to the given reaction.

Storing the reactions in a separate table with the guild and message ID's as the primary keys could work, the table would also need to store a map of the reaction/emote IDs and the ID of the role that should be given to a user when someone reacts to the message.

The Command

The command should most likely work in steps, something like the following:

First you'll create the description of the message, this would be shown at the top of the message sent by the bot once the command is done.

!somecommand <description>

Then you'll add any role along with an emote.

!somecommand <emote> <role>

Then at the end you'd tell the command you're done by using.

!somecommand <done|finish|complete>

This would send the message with the description, and a list of the emotes you can react with, along with the roles attached to each emote.

It is also possible that the command at first would just take in the description and send that message, then the user could use the command again along with an ID provided for the message(Kinda like the modlog case ID) to then edit the message by adding/removing roles.

Meme command doesn't allow either top or bottom to be empty

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://avairebot.com/support

Description

For background, I'm not currently self-hosting.

The !meme command seems to fail if <top text> lacks alphanumeric characters. As an example, the following will fail to produce an image:

!meme aag "" "MEMES"
!meme aag " " "MEMES"

This isn't urgent, obviously, and it might be operating as intended, but it would be nice to be able to generate a meme with only top or bottom text by being able to specify an empty string or a space. Thanks in advance for looking at this!

Servers dont have :online: :dnd: :away:

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions. [x]

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Hello,
I was using the self hosted version of Avaire but when i did the !cats in my own server this should have happend:
The Support Server

But instead this happend:
image

My idea should be that if the server does not have any custom icon's. That the bot create's them from a Picture's folder.

Greetings,
Stefano ;)

Save music states and resume music after a reboot

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Create a system that will save the current state of the music when the bot is shutdown normally through a ;shutdown, ;restart or ;update system command, the followhing things should be stored:

  • The Guild ID that the bot was playing in.
  • The Channel ID that the bot was playing in.
  • The Channel ID that was used to get the bot playing music.
  • The song was that playing at the time.
    • The song url and the timecode should be enough to get the bot playing again.
  • The volume that the music was playing at at the time.
  • The tracks in the queue.

Looping over all the servers using music just before shutdown, creating a map, and storing that map in the file cache for 1 - 6 hours should work, the cache could be deleted on read as the bot starts back up again. Listening to the ReadyEvent event, each guild in each shard could be handled one by one as the bot comes online.

Command suggestion: Remind

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

!remind <human readable time> The stuff you wanna be reminded about

Reminds you whatever text comes after the command after the specefied time, the time could be in the format of 3h20m for 3 hours and 20 minutes, or optinally using one of Carbons time formats.


Suggestion was orginally made by kazasho#1 (ID: 218792916729069569) from the AvaIre Central server.

DJ can change volume without being in voice

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

DJ can change volume without entering voice

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Anyone with the DJ role can change the volume of the bot even if there not in voice with the bot

Feature Request: d-style rolls

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

!roll command supports n-sided dice. For example, to roll eight six-sided dice, pass !roll 8d6. (number of dice)d(n sides). This is useful for Tabletop RPG players especially.

Feature Request - Play first song

Hi.
Why don't we have a toggleable option to always play the first song found after typing !play songname ?

Thank you for considering this.

Ticket System

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://avairebot.com/support

Description

Suggestion: Add a ticket system with transcripts after the ticket is closed and a ticket management command to add users to a ticket, temp-lock a ticket, ban the person who made the ticket specifically from making new tickets (not from the entire bot) and renaming the ticket channel / channel description.

Bot doesn't leave voice when the queue ends

When the queue is empty and the current song playing end, the bot will stay connected to the voice channel, the bot should auto disconnect at this point unless a new song has been added to the queue.

Note This seems to be caused by an interrupt exception thrown by JDA/LavaPlayer when the queue ends by itself.

Add ability to repeat a single song to !repeatsongs

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

There's already a command that repeats a queue !repeatsongs but I would also like that command to repeat a single song in a queue, for example you could use the command like !repeatsongs one to repeat the current song

Server Activity Log

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Create an Activity Log command that allows the user to specify a channel used for logging activity on the server, possibly add options to toggle different "flags" on and off which should determine what is logged to the channel.

Things that could be logged include:

  • Message edits
  • Message deletes (Excluding bulk deletes)
  • Username changes
  • Discriminator changes
  • Avatar changes

Using a queue system for logging the messages could be a good idea for large servers where the bot might end up sending multiple messages every second, instead of spamming the API, the different events could be stored in a list, and then be sent all at once in a single message request.

Aliases trigger the wrong command under certain conditions

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

While I was testing some of my changes, I created an alias for a few commands to speed up typing. However I came across an issue while using the aliases. To reproduce it:

  1. Create an alias for any command, like !alias !p !play where !p triggers !play
  2. Create another alias for another command that shares the first few letters of the first alias, like !alias !pi !ping where !pi is supposed to trigger !ping
  3. Run !pi and notice that !play is executed instead.

Whats supposed to happen:

!pi should trigger !ping and !p should trigger !play

What actually happens:

!pi and !p both trigger !play

Now playing in status message

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

This feature is not possible if the bot is playing in two or more servers at a time, since the status are shared between every server the bot is on, however it could work for self-hosters who only use the bot on one server.

The status of the bot should change as the music handler goes through the queue, when a new song is playing, the bots status should change to reflect what is being played. The feature should be toggleable, either through a config value, or a command that can store the state in the database/file cache, the database is obviously the better choice here.

Using a command to toggle the feature could be a simple on/off switch, the comparator utility could be used to see if the user wants the feature on or off. When the command is disabled the bots status change job should return to normal.

Save music states and auto-resume playing after inactivity

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Right now when a server has been inactive too long while playing music, the music handler will be destroyed, the queue emptied and the bot will close all the audio connections to the server, instead the bot could take a snapshot of the current queue, playing track, and voice channel, then destroy the internal player and leave the voice channel, the snapshot of the audio state at the time before the bot leaves could be used to resume the music if a user joins the voice channel again.

The snapshot could be stored in in a guava cache instante where the voice channel ID is used as the key, the cache shouldn't last for more than a few hours(2 - 3) and a server should only be able to keep one cache per server, checking if a cache for a server already exists before writing to the cache would be a good idea so a server can't store 1,000+ tracks in the cache for 100 different voice channels. Checking when a voice channel is deleted, and removing any cache entities on that event should also be useful in clearing up the cache, as an additional extra, adding the cache to the garbage collector task to cleanup the cache as it might not get hit super often would also be a good idea.

New mod functions - welcome/greeting

Apologies for lack of syntax experience here.

I'd like to suggest having a welcome message for new users (tetsumaki does this somehow) and a greeting for returning users.

Change Playlist Order. Feature Request

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Recently i have a thought that the user is able to move a song that on no.29 in playlist to no.1 in playlist. I would be so thankful if you can make it happen by a creating that command. Sorry for broken English.

No Hungarian language support

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Hello, I'm really interested in this bot, but there are no Hungarian language support. Maybe someone in Central could fix this? Would be appreciated :3

Add support for providing YouTube and Twitch API keys

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

With the continued growth of Ava, a day will come eventually where too many people will try and load too many songs too quickly, causing the bot to either be ratelimited or outright banned from querying YouTube videos, to prevent this it would be a good idea to move away from the built in Lavaplayer source manager for some special sources like YouTube and Twitch.

Lavaplayers YouTube source manager is currently using jsoup to load a URL, parse the HTML, and then find the video data, doing this isn't really optimal if the bot is trying to loads hunders of tracks at the same time which could happen when a lot of servers tries to load a lot of custom playlists at the same time.
With the release of Lavaplayer v1.3.9, it is now possible to provid a custom Twitch client ID when using their built in Twitch source manager, so not a lot of work would be required in order to add support for that.

Solution

The solution for this could be a wrapper around the Lavaplayer source manager which could change where tracks are loaded from dynamicly depending on if a valid google API key with YouTube data is enabled or not, if a valid API key is provided, the API sould be quried directly, while if no API key is provided, the current Lavaplayer source manager should be used as a fallback, allowing self-hosters to still use the bot for music with no need for a google API key.

Before anything for this is worked on, rewriting/finishing the RequestFactory would almost certiantly be a must as the wrapper would need to send more "complicated" HTTP requests to YouTubes(And possibly others) APIs in order to query the data correctly.
An option would be to use okhttp3 for this, since it's realy used internally in JDA for talking to the Discord API so no extra dependencies is needed, it should also work well with the metrics, giving people a better insight into the requests that are sent and the responses that are recevied.

Install & Remove plugins through a command

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

The ;plugin system command already exists, and it has the ability to list available and installed plugins, having the additional feature of being able to install or remove an installed plugin right from Discord through a command would be pretty sweet!

Note: In the description below, <> is used to represent required arguments seperated by a pipe character |, while [] is used to represent optional arguments that could be excluded from a command.

Adding/Installing Plugin
Adding or installing a plugin through a command could use the plugins source field to handle different sources like github, bitbucket, gitlab, etc. Once the source is known, the releases for the sources could be searched for a jar file, from there the file could be selected by their version, downloaded and installed.
We can most likely not avoid having to restart the bot, but just being able to find and download the jar file would be pretty nice.
An example of the command could be:

;plugin <install|i> <plugin-name> <tag/version>

Using the command without the tag/version should display a list of avilable tags/versions for the given plugin.

If the plugin is already installed and the version matches the given version the install should not be run, while if the version given is higher a promt should be given before the command is actually invoked, just to let the user know that they're upgrading to a new version of the plugin and with the changes to the plugin, they may need to upgrade their bot as well, since plugins can defined the minimum version of Ava they can be used on.

Removing Installed Plugins
Removing a plugin should be easy enough as we're already able to list installed plugins, we just have to find the plugin source file, unload the plugin from the process and then delete the source file, possibly also delete any config files that came with the plugin, that could be an aditional option for force deleting the plugin.
An example of the command could be

;plugin <remove|delete|r|d> <plugin-name> [--force]

Add a channel medialock command

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the [latest Ava version][version].
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to [StackOverflow][stack overflow]
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

I would like a command called "!medialock" added to AvaIre. The way the command works is that it would toggle a boolean called mediaLocked with the channel the command was issued in. By default the boolean is false. The bot would send a message saying this channel has been added to the list of media only channels, or if the channel has been removed from the list a message would be saying the channel has been removed from the list. The ideal place for this boolean would be in the ChannelTransformer.java file, but I am not sure what table I need to create a migration for. Next it would scan for messages that do not start with the prefix char and also have the channel's media lock variable set to true. This if statement would be inserted into the MessageEventAdapter.java in the onMessageReceived method. The next thing I would do is check to see if the message has any attachments. If so I would iterate through each one and store the file extension into a variable, as it can easily be done with a substring starting from the last index of a period plus 1. Next I would check to see if the attachment is an image by using the Message.Attachment.isImage method and also check the extension against known media file extensions added to a list. If either condition is true, the message gets deleted. If there are no attachments, I would check to see if the message is a valid url; the way I would handle it is using the Apache Commons Validator UrlValidator. After retrieving an instance it all that needs done is to use the isValid method. If it is not a valid URL, the message gets deleted. I would also add an empty block as a precaution that check to see if it is a valid URL as a precaution against it being deleted from an else statement that deletes any other message types.

Discord on fire "fix"

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

Discord keeps going on fire.

When the bot queries the discord API and does not get a response, or get's disconnected, push it into a reconnect loop with different timers.

Like, reconnect every 5/10/15 minutes. (Without the bot stopping on trying to reconnect)

If there is any way that this state can be tracked that is.

[HEROKU] Plugin support

General Troubleshooting

  • x I have checked for similar issues.
  • x I have updated to the [latest Ava version][version].
  • x I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

Issue

General issues/features that are missing when using AvaIre on Heroku.

Issue Type

  • x Bug Report
  • x Feature Request

Description

AvaIre runs now on Heroku fine. A normal user can interact with her, and can also change the env variables on the fly. Making it a worthy choice compared to traditional solutions.

However, some issues/features are yet to be fixed/implemented. The following are yet to be implemented/fixed:

  • Plugin support. As of now, adding plugins can't be done directly with the deployed template. You can, however, make a fork, add the plugins yourself, and deploy that. Senither already suggested using environment variables for this too. Even tho he suggests this for watchdog. It could be used in AvaIre aswell.
  • Using the API. As of now, AvaIre uses a WORKER dyno. To get the API working, the jetty server has to somehow connect to the port, that is given by the web dyno. As these docs suggest. If this works, AvaIre's stats are then exposed, what can be used to run the avaire/status project. Or a minimal, self-made music dashboard for example.
  • Cleaning the build files that Gradle creates after compiling on Heroku. As of now, when Heroku is done compiling with Gradle. It leaves the build artifacts, what increases the total slug size to 307mb (as of now). Heroku suggests using under 300mb to not affect boot time to much. The lower this number is, the faster AvaIre will startup. You cannot use the .slugignore, as this is used before de buildpacks. It's explicitly after the last buildpack, that this happens. Possibly, some script could be run to clean. I'm thinking of using this buildpack. And adding lines that delete the build artifacts.
  • Support of using mysql string, like: mysql://drf92r47agqzea9k:c83wl6ot8sbtmuvd@r6ze0q02l4me77k3.chr7pe7iynqr.eu-west-1.rds.amazonaws.com:3306/mbyaga9t3h70nls9. But most importantly that this string can be used, using the env variable name: JAWSDB_URL. IF, this will be implemented into AvaIre. Users no longer need to set anything themselfs after deploying. Making deploying the easiest way possible. As only copying and pasting the api/token/etc into the template and hitting deploy is then needed.

Mute Command

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

A command that when used, will assign a role to the user for some given amount of time, along with a reason, the time, reason, user, and guild ID should be stored in a database table to keep track of the mutes when a user is successfully muted, the action should also be reported to the modlog channel if one is set.

If no time is given the mute should last indeffently, users who are muted, leave the server and re-join back should also have the muted role re-applied automatically.

If a time is given the unmute should also be reported to the modlog channel along with the reason they were orignally muted for, and a link to the case ID that the original mute has.

If the command is invoked without any mute role on the server, there should be an option for the bot to create the role automatically.

The feature could be split up into two different commands, or one command with optional arguments, so one command would be !mute and another !tempmute, or the command could follow a format like this:

!mute <user> [time] [reason]

Where if no valid time is given as the secondary argument, it will simplely just be ignored.

How can we use mongodb as database?

Hi, i am really curious to know how we can use mongodb as a database, since i dont quite get how to use mysql, or if anyone here can share me some info on how to make my own mysql database, since i am totally not sure how to do that

Feature Request: New bot command MediaLock

General Troubleshooting

Hey there! Before you report a bug or suggest a new feature,
please make sure to follow these steps first!

  • I have checked for similar issues.
  • I have updated to the latest Ava version.
  • I have checked the branches or the maintainers' PRs for upcoming features/bug fixes.

This is not the place to learn Java. Please refer to StackOverflow
for your general programming questions.

Issue

Issue Type

  • Bug Report
  • Feature Request

For questions join the official AvaIre discord server: https://discord.gg/gt2FWER

Description

The staff of the server I am on are looking for a command that allows only types of post content is certain channel types. One of these types is a media channel designed for posting YouTube videos, links, among other files as attachments. For some reason or another, some members having been having conversations in that channel; which has to constantly to be removed and have the members be reminded several times over again. The staff is getting tired of it. This is where the media lock command comes in place. By running
!medialockin that channel, the bot will monitor messages in that channel and automatically remove any post that do not contain any sort of media. If the staff should ever decide to allow other post types into that channel, then all they would need to do is run !medialock on that channel again to have the bot stop checking post types in the channel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.