Code Monkey home page Code Monkey logo

better-airhorn's People

Contributors

clemens-e avatar code-factor avatar dependabot-preview[bot] avatar qwright10 avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

venomcoding igts

better-airhorn's Issues

make help more accessible

It was quite a pain to find any command for the bot. even the $help command was hard to find.
There should be a simple solution to access the help for any user.

my idea:

  • use the status text of the bot to display the $help command,
  • send an text with rudimentary instruction to the user if he messages the bot with any message containing the string "help".

Question about specific commands

You mention using 'mode zero' to download the audio rather than uploading it. What command exactly is that?
I tried:
$mode 0
$mode zero
$mode0
$modezero
It helps for your readme to be as specific as possible with commands. Thank you for your bot!

help paging with reactions bugged

as it is:

  1. $help
  2. bot displays page 1 of help with <1 and >1
  3. i click >1
  4. help page 2 (music) is displayed with <1 and >2
  5. to reach the next page i've to click >2 twice (1st to remove one reaction, then another time to reach the next page

what it should be:

  1. $help
  2. bot displays page 1 of help with <1 and >1
  3. i click >1
  4. help page 2 (music) is displayed with <1 and >2
  5. bot removes my reaction, so that <1 and >1 is displayed
  6. next or previous page can be reached by clicking just once

$join and $leave commands should be added

how it is:
whenever someone uses the $play command, the bot joins a channel, plays the selected file and leaves the channel thereafter.
this is quite the annoying behavior, because, everyone gets the "someone joined the channel" notification sound from discord, then the played sound, and then the "someone left the channel" notification sound.

how it should be:
there should be an option (like $join and $leave commands) to let the bot linger in the voice channel, so that the Sounds can be played without the join and leave notification sounds from discord.

$play joins, even if it is not playing anything

how it is:

  1. $play <something i don't have the rights to play>
  2. bot joins voice
  3. bot leaves voice
  4. bot gives error message "Misssing permission to this audio"

How it should be:

  1. $play <something i don't have the rights to play>
  2. bot gives error message "Misssing permission to this audio"

Bot wont disconnect when missing permissions for audio

switch (cmd.privacymode) {
case 1:
if (author.id !== cmd.user) return this.reject(message);
break;
case 2:
if (author.id !== cmd.user && guild.id !== cmd.guild) return this.reject(message);
break;
case 3:
break;
default:
throw new Error(`This should ** never ** happen, if this persists please report it in the support server.
DEBUG INFO: Privacy Mode = ${cmd.privacymode} `);
}
await this.client.AudioStorage.play(voice, cmd.commandname);
voice.disconnect();

In the code snippet above, the play command already has a voice connection created by message.ts, so any play command will always connect to the voice chat first. Then the permission checking happens in the switch (cmd.privacymode) and will fail if the user does not have permission to play the requested audio clip and return the reject message. This means the voice.disconnect() is not being invoked in the instance where you do not have permissions to play an audio clip and the bot is left stuck in the voice channel.

My recommendation is to either modify the reject() function to always attempt a voice.disconnect() before returning, or to modify the switch (cmd.privacymode) to call voice.disconnect() before returning reject.

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.