clemens-e / better-airhorn Goto Github PK
View Code? Open in Web Editor NEWDiscord Bot to upload/record and play short audio clips
Discord Bot to upload/record and play short audio clips
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:
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!
as it is:
what it should be:
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.
how it is:
The $help command doesn't contain information about uploading sound files.
how it should be:
there should be information in the $help command how to upload sound files.
how it is:
How it should be:
better-airhorn/src/commands/music/play.ts
Lines 57 to 72 in 172cf0d
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.