|
| 1 | +# hackmud-chat-client |
| 2 | + |
| 3 | +If you don't want to run this in a docker follow the steps [here](https://github.com/Slingexe/hackmud-chat-client) |
| 4 | + |
| 5 | +## First time setup (For Docker) |
| 6 | +Create a discord bot using [Discord Developer Portal](https://discord.com/developers/) |
| 7 | +Create a discord server (Its not recommended to have this bot in a public server) |
| 8 | + |
| 9 | +### Bot Permissions |
| 10 | +**Make sure the bot has these permissons set, otherwise it will break!** |
| 11 | +``` |
| 12 | + Privileged Gateway Intents |
| 13 | + - Message Content Intent |
| 14 | +
|
| 15 | + Server Role Permissions |
| 16 | + - View Channels |
| 17 | + - Manage Channels |
| 18 | + - Send Messages |
| 19 | + - Add Reactions |
| 20 | + - Manage Messages |
| 21 | +``` |
| 22 | + |
| 23 | +Pull the latest release from [DockerHub](https://hub.docker.com/r/slingexe/hackmud-chat-client) |
| 24 | +`docker pull slingexe/hackmud-chat-client:latest` |
| 25 | + |
| 26 | +Run the docker with the following command |
| 27 | +`docker run -e TOKEN=token123 -e CLIENTID=12345 -e GUILDID=12345 slingexe/hackmud-chat-client` |
| 28 | +`docker run -e TOKEN=token123 -e CLIENTID=12345 -e GUILDID=12345 -d slingexe/hackmud-chat-client` - For detatched mode |
| 29 | +Note: Once you run the docker once with the Token, ClientId and GuildId arguments you don't have to pass them again unless you want to change them |
| 30 | + |
| 31 | +To get the three arguments follow these steps |
| 32 | +Copy the bot's discord token (Application > Bot > Token) |
| 33 | +Copy the application's clientID (Application > OAuth > ClientID) |
| 34 | +Copy the guildID (Turn on dev mode > Right Click guild > CopyID) |
| 35 | + |
| 36 | +In hackmud run the command `chat_pass` and copy the result |
| 37 | +In discord send `/settings auth password:"pass"` |
| 38 | +Once it says its successfully set the Token run `/settings setup`, this should create text channels with the users you have on your hackmud account |
| 39 | +Run `/settings manage-users user:username pull:True` to enable pulling messages from your users (This doesn't affect the ability of sending messages as said users only recieving them) |
| 40 | +Once you have done all that you are now able to run `/client start` (Once you have done all the steps above the bot should pull messages on startup) |
| 41 | +The guild the bot is in should now have all of your users set as channels and it should start pulling messages. |
| 42 | + |
| 43 | +## Usage |
| 44 | +Type in the channels the bot created to send a message to hackmud |
| 45 | +Change the channel the bot sends to by doing the same thing you would normally do with the chat box (%n00bz / %0000) |
| 46 | + |
| 47 | +## Contributions |
| 48 | +All contributions are greatly appriciated! I am not great at coding so expect lots of spaghetti code. |
| 49 | + |
| 50 | +# Useful Links |
| 51 | +[Hackmud Chat API Documentation](https://hackmud.com/forums/general_discussion/chat_api_documentation) |
| 52 | +[Discord ACSI Color Codes](https://gist.github.com/kkrypt0nn/a02506f3712ff2d1c8ca7c9e0aed7c06) |
| 53 | +[Discord.JS Guide](https://discordjs.guide/) |
0 commit comments