LiveQuery is a program that is used to fetch messages sent on Source game servers and post them to a Discord channel.
- Node.js and npm. If you are running Linux, you should use nvm. If you are running Windows, you should probably use nvm-windows or install Node and npm through
chocolatey
.
Setup is unnecessarily complicated until I streamline the process.
- Run
npm install
. - Run
cd bot
andnode setup.js --token='yourToken' --channelID='yourChannelID'
. Make sure you are in the same directory assetup.js
before running thenode setup.js
command. - Invite the bot to your server. This image will show you how to do it. If you don't have a bot client created already, you can create one on the Discord Developers page.
- Make sure your bot has access to the channel.
- Run
npm run main
. Run this under ascreen
so the bot doesn't shut down when you exit your shell session. - Install the corresponding plugin to your server:
- Configure the plugin. For Clockwork, you just need to change the
server
variable insh_plugin.lua
to whatever the IP or hostname the bot is running on is. Additionally, make sure the port appended to the IP/hostname is correct. It is25050
by default.
The bot was created with Discord.js v11. v12 introduced breaking changes, so it may not work. If you need a v11 version of Discord.js, you can use npm i [email protected]
.
- You get a JSON parse error whenever someone sends a message containing quotes ("").