Skip to content

Commit 0e581eb

Browse files
authored
Seperated the readme for running in and outside a docker
1 parent 37283f2 commit 0e581eb

File tree

2 files changed

+57
-10
lines changed

2 files changed

+57
-10
lines changed

READEME-DOCKER.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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/)

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# hackmud-chat-client
2+
3+
If you want to run this inside a docker you can find the steps [here](https://hub.docker.com/r/slingexe/hackmud-chat-client)
4+
25
## First time setup
36
Create a discord bot using [Discord Developer Portal](https://discord.com/developers/)
47
Create a discord server (Its not recommended to have this bot in a public server)
@@ -20,8 +23,7 @@ Create a discord server (Its not recommended to have this bot in a public server
2023
Copy (or rename) the example config "configex.json" to "config.json"
2124
Copy the bot's discord token to "token" (Application > Bot > Token)
2225
Copy the application's clientID to "clientId" (Application > OAuth > ClientID)
23-
Copy the guildID to "guildId" (Turn on dev mode > Right Click guild > CopyID)
24-
Run `node deploy-commands.js` so all the commands deploy instantly to your server
26+
Copy the guildID to "guildId" (Turn on dev mode > Right Click guild > CopyID)
2527
Run the BOT using `node index.js`
2628

2729
In hackmud run the command `chat_pass` and copy the result
@@ -31,21 +33,13 @@ Run `/settings manage-users user:username pull:True` to enable pulling messages
3133
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)
3234
The guild the bot is in should now have all of your users set as channels and it should start pulling messages.
3335

34-
# Docker
35-
Download the latest release image from [Gitbub](https://github.com/Slingexe?tab=packages&repo_name=hackmud-chat-client) or [DockerHub](https://hub.docker.com/r/slingexe/hackmud-chat-client)
36-
Run the docker with `docker run -e TOKEN=token -e CLIENTID=clientid -e GUILDID=guildid slingexe/hackmud-chat-client`
37-
Pass the `-d` argument to run the docker in detached mode
38-
The continue with the regular setup process
39-
40-
4136
## Usage
4237
Type in the channels the bot created to send a message to hackmud
4338
Change the channel the bot sends to by doing the same thing you would normally do with the chat box (%n00bz / %0000)
4439

4540
## Contributions
4641
All contributions are greatly appriciated! I am not great at coding so expect lots of spaghetti code.
4742

48-
4943
# Useful Links
5044
[Hackmud Chat API Documentation](https://hackmud.com/forums/general_discussion/chat_api_documentation)
5145
[Discord ACSI Color Codes](https://gist.github.com/kkrypt0nn/a02506f3712ff2d1c8ca7c9e0aed7c06)

0 commit comments

Comments
 (0)