If you want to build your own bot, the bot is develop base on python. Python3 is require for installation and ffmpeg for audio procession. Here are the procedure to run Xiao-xia locally.
-
Install python virtual environment
sudo pip install pipenv pipenv install
-
Add personal discord token
Edit
.env_example
and rename the file to.env
-
Install ffmpeg
For Windows: tutorial
For Mac:
brew install ffmpeg
For Linux :
sudo apt-install ffmpeg
-
Activate virtual environment and run
pipenv shell python3 main.py
-
Run in docker
docker build -t discordbot . docker run -d discrodbot
- Invite with this url
/play {url}
play music (youtube or spotify)./platlist
show all playlist/save_platlist {name}
save current playlist/skip
skip the song./pause
pause the song./list
show the playlist/loop
loop current song./clear
clear the playlist/leave
leave the voice channel.
/upload_sound {name} {file}
upload your own sound./list_sound
list all available sound and play it./search_sound
search sounds by keywords./say
say the word./autosound
Automatically detect voice and play sound effects board/stop_autosound
Stop autosound
- I will reply all message, if you want to shut it down, use
/silence
to shut me up - Use
/clear_talk
clear the chat history. - Use
/talk
so I can keep talking. - Use
/joke
let me say a joke. - Use
/chickensoul
let me say a chickensoul. /encrypt
Convert the message into Morse code./decrypt
Convert Morse code into messages.
/get_covid
Get the number of confirmed cases in Taiwan/weather_day
Get today's Weather Overview (Taiwan)/weather_week
Get weather overview for the week ahead (Taiwan)/weather_pos
One-day weather forecast for each city area (Taiwan)/summaryPdf
Read the PDF and summrize each page/eew_alert
Earthquake early warning (Taiwan)/eew_alert_stop
stop Earthquake early warning (Taiwan)
/vote
vote/ping
Show latency/骰子
dice