A simple bot that plays a brazilian-style rocket sound whenever is called by someone in a voice channel and then leaves.
Using only the discord.js and discord-opus dependencies, the bot code structure consists in one single Javascript index file, alongside an audio file and a Procfile for Heroku deployment. The code has one event, which prints something in the terminal when the bot is ready to use, and one command that follows this logic:
Whenever an user inside a voice channel that isn't a bot types '!rojao' or '!rojão' (in portuguese, rocket or firework), the bot triggers the 'join' command to join the voice channel. Then, the bot replies the message author with a text simulating the sound of the rocket (with a brazilian type of accent and some emojis), plays the audio file and, as the reproduction finishes, leaves the voice channel.
4.2
리뷰 5개
리뷰는 등록된 사용자만 남길 수 있습니다. 모든 리뷰는 Top.gg의 사이트 중재자가 관리합니다. 게시하기 전 저희의 지침을 반드시 확인해 주세요.
별점 5점
4
별점 4점
0
별점 3점
0
별점 2점
0
별점 1점
1
Muito foda seu bot, mas como vc fez pra ele sair sempre que acaba o audio??
Apesar de eu ter dado um refactor por questão de segurança, o código é open source. Todas as feats do bot estão no repositório dele no GitHub.