Search the Community
Showing results for tags 'webhook'.
Found 1 result
-
Hello everyone, I have made a simple code for separating the village and alliance chat. All you need is a webserver to host the bot, a bot user created at https://discord.com/developers/ and have the dev mode on Discord enabled. It currently only allows one village input but I will allow separate channels per village in the future. INSTALLATION: Create a new bot user at https://discord.com/developers/ . Name has to be the village name. Add it to your guild (discord server) with read/send message and read message history permissions) Insert your bot token in the .env file BOT_TOKEN='YOUR TOKEN GOES HERE' Create an input channel and create a webhook to it. Oh and make sure to add and enable it ingame! Create two output channels. Names are up to you. Copy the village and alliance channel IDs into the .env file OUTPUT_VILLAGE='VILLAGE CHANNEL ID' OUTPUT_ALLIANCE='ALLIANCE CHANNEL ID' Copy your Guild ID into the .env file. GUILD_ID='GUILD ID GOES HERE' Choose if you want to display the messages as embeds or plain messages USE_EMBEDS='true/false' Save everything and upload all files to a server. Run 'npm i' to install the bot Run the bot using something like the pm2 package (Make sure to run it from the base dir and not from /src. So it would look like this: 'pm2 ./src/index.js' Profit To get the IDs just enable the dev mode (google it if you don't know how) and rightclick the channels and the guild name on the left navigation bar. I hope this is all explained enough. If anything is unclear or you encounter a bug just post here or message me on the Wurm Online Discord Server which is usually quicker. Feel free to use the source code to embed it to your bot or change it to your needs. LINK: https://github.com/CapiGe/WurmAVwebhook If you need any help setting everything up drop me a Discord DM. Capi Discord Administrator