-
Notifications
You must be signed in to change notification settings - Fork 9
DiscordJS Bot and Pode API for SSM
Robomikel edited this page Jul 3, 2022
·
13 revisions
You can use discord to start, stop, and get details for a server with SSM.
this is not totally finished. very experimental at this point
Install:
- Install the system-wide installer for NodeJS
- SSM
Add branch to path
"disable clear vars" switch. Due to SSM breaks in Pode when clearing vars. as well as details and query vars to bot- Add branch to path
- Create a Discord Bot
- https://discord.com/developers/applications
- Create Application
- GoTo Bot section and create bot. Make note of Bot Token
- GoTo OAuth2 and make note of Client ID
- Add Bot Token to config.json in root folder of SSM branch
- in config.json change serverfolder name to the server folder you want to use with bot. ie. "csgoserver"
port is used for the API, not the steam ports. no change needed.
- Invite Bot to discord server using
https://discordapp.com/oauth2/authorize?client_id=<bot client id here>&scope=bot
Starting:
- In root folder of SSM ❗
- SSM command start-pode
ssm start-pode
will download Pode. start pode and Discord bot. Use ctl-C to stop
Discord Bot Commands:
!ssm start csgoserver
!ssm stop csgoserver
!ssm query csgoserver
!ssm details csgoserver
Just as a note. You need a server installed and running already. Use local_settings.ps1 to point to were ServerFiles is located. Test without bot to make sure ssm commands work. Like start, stop, and query etc...