Jump to content

hello all,

 

i have a discord server with a couple of friends on it. I would like a bot to randomly join a channel (with people in it) and play a sound. how would i do this?

 

-matty

If you judge a fish based on its ability to climb trees it will go its whole life thinking its a failure.

Link to comment
https://linustechtips.com/topic/899146-discord-bot-help/
Share on other sites

Link to post
Share on other sites

I think it depends on your criteria for playing the sound.

Like do you want it to randomly every 5-10 minutes find a channel with people and play a sound?

Do you want it to play a sound when the channel has more than 5 people connected?

Do you want it to play the sound when a new user joins a channel?

 

Would need something to trigger the sound event.

Osmium: NFC Skyreach 4 // i7-8700k (delidd) // GTX 1080 // 32GB DDR4-3200Mhz // 1TB 960 Evo M.2 // 1.1TB MX300 m.2
Peripherals: Razer Blackwidow // Razer Orbweaver // Razer Kraken // Logitech G502 // Logitech K830 // LG 34UC88-B

Usage: Adobe Lightroom // Adobe Photoshop // Web Dev // Recording Gameplay // Video Editing // Portable Gaming

Link to comment
https://linustechtips.com/topic/899146-discord-bot-help/#findComment-11072820
Share on other sites

Link to post
Share on other sites

Not sure any public bots include this feature due to not really having a use and being more annoying to the server rather than helpful.

Your best bet would be to buy a custom bot (single command like this shouldn't be but 10$ or cheaper).

Otherwise you can code your own using the discord API which shouldn't be too terribly difficult if you have coding knowledge.

 

Osmium: NFC Skyreach 4 // i7-8700k (delidd) // GTX 1080 // 32GB DDR4-3200Mhz // 1TB 960 Evo M.2 // 1.1TB MX300 m.2
Peripherals: Razer Blackwidow // Razer Orbweaver // Razer Kraken // Logitech G502 // Logitech K830 // LG 34UC88-B

Usage: Adobe Lightroom // Adobe Photoshop // Web Dev // Recording Gameplay // Video Editing // Portable Gaming

Link to comment
https://linustechtips.com/topic/899146-discord-bot-help/#findComment-11072875
Share on other sites

Link to post
Share on other sites

Just now, Revamp said:

Otherwise you can code your own using the discord API which shouldn't be too terribly difficult if you have coding knowledge.

 

i have some and this sounds fairly simple to do 

 

1 minute ago, Revamp said:

annoying to the server rather than helpful.

yeah this is why i'm doing it xD

If you judge a fish based on its ability to climb trees it will go its whole life thinking its a failure.

Link to comment
https://linustechtips.com/topic/899146-discord-bot-help/#findComment-11072880
Share on other sites

Link to post
Share on other sites

1 minute ago, Matty2048 said:

i have some and this sounds fairly simple to do 

 

yeah this is why i'm doing it xD

may as well make a new server with no friends in it, because that's what you're getting at if you deploy a bot to play an annoying sound every few minutes. I know I would leave in a heartbeat lol.

 

Anyways on topic, it should be easy

1. pick a random amount of time between x and x minutes.

2. start timer.

3. once timer hits the random threshold scan all channels for 1+ people and add each voice channel to a list.

4. pick a random channel from list.

5. have bot enter voice channel and either play a sound file hosted by you, or play a youtube video with sound, etc.

6. clear list, timer, etc and repeat.

 

Discord API should have commands for all of these features. Music bots will leave channels with no users remain and such so they have a method of counting users in a channel, etc.

 

Osmium: NFC Skyreach 4 // i7-8700k (delidd) // GTX 1080 // 32GB DDR4-3200Mhz // 1TB 960 Evo M.2 // 1.1TB MX300 m.2
Peripherals: Razer Blackwidow // Razer Orbweaver // Razer Kraken // Logitech G502 // Logitech K830 // LG 34UC88-B

Usage: Adobe Lightroom // Adobe Photoshop // Web Dev // Recording Gameplay // Video Editing // Portable Gaming

Link to comment
https://linustechtips.com/topic/899146-discord-bot-help/#findComment-11072895
Share on other sites

Link to post
Share on other sites

Just now, Revamp said:

may as well make a new server with no friends in it, because that's what you're getting at if you deploy a bot to play an annoying sound every few minutes. I know I would leave in a heartbeat lol.

 

nah don't worry they're on-board with it 

If you judge a fish based on its ability to climb trees it will go its whole life thinking its a failure.

Link to comment
https://linustechtips.com/topic/899146-discord-bot-help/#findComment-11072900
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×