Welcome to the efforts of countless hours of learning and failed attempts at writing code that culminated into this project known as Gatekeeper! Originally this started out as a bot to bring CubeCoders AMP to Discord with support for only Minecraft, but has evolved into this encompasing project of providing support for any type of server AMP can run along with providing as many of AMPs core features inside of Discord.
Need Support or have questions? Please visit my Discord and post in the respective channels. Come Join my Discord - Kat's Paradise
- User friendly with very basic setup required by the User. Gatekeeperv2 can manage its own permissions inside of AMP.
- Can Support more complex Permission setups. See the Permissions Guide for more information.
- Ability to control AMP Servers with Discord slash commands and Text input.
- Interaction with AMP Server Consoles and Server Chat via Discord Text Channels.
- Uses a SQL Database to store Users and Server information.
- Full support inside of AMP via AMP Template with constant updates.
- Cross platform support; Windows or Linux.
- Support for your own Cogs/AMP Dedicated Server.
- See cog_template.py and amp_template.py for brief examples.
- Uses Autocomplete features to help complete commands and help navigation.
- Full Support for Discord Channels, Discord Roles and AMP Servers.
- Supports custom Banner images for displaying AMP Server specific information.
- Supports Regex Patterns for custom filtering of your AMP Console to Discord Channel output
- This also works on Events such as Disconnect, Deaths and Kills.
- Python 3.10 or greater
- Pip 2.1 or greater
- Cube Coders AMP License
- Discord Bot Account
- Please visit Creating a Bot Account
- Use this Scope and Permissions -> Permissions
- Create an AMP user for the Bot with
Super Admins
role, must be done on the Global AMP Home Screen GUI.- Usually this is the URL ending in 8080 when connecting to AMP. (eg.
http://X.X.X.X:8080
)
- Usually this is the URL ending in 8080 when connecting to AMP. (eg.
- Follow the instructions in
tokenstemplate.py
file -> tokenstemplate.py - From Command Line run script
start.py
(eg.../Discord Bot/start.py
)- Run the bot, it will finish installing the rest of the requirements.
- See Interacting with the Bot~
- Create an AMP user for the Bot with
Super Admins
role, must be done on the Global AMP Home Screen GUI.- Usually this is the URL ending in 8080 when connecting to AMP. (eg.
http://X.X.X.X:8080
)
- Usually this is the URL ending in 8080 when connecting to AMP. (eg.
- Create a new instance of GatekeeperV2 in a container. (The container option can be found under
Configuration -> New Instance Defaults
) - Configure the settings in the GatekeeperV2 Instance under the
Configuration -> Bot Settings
, clickUpdate
, then start the bot. - See Interacting with the Bot~
- After Gatekeeper has connected to your server, please run the command
$bot utils sync
.- This should populate all of its available commands to your guild.
- See Commands for a full list of all Bot Commands and how to use them.
- TIP: Parameters such as
role
andchannel
support IDs and names
- TIP: Parameters such as
- When commands are added or removed it is highly suggested that you
reset
your command tree andre-sync
- See Bot Commands
/bot utils sync
for details on how to reset your local command tree.
- See Bot Commands
- Use
/bot moderator (role)
and the bot will add that role as the minimum required role to interact with the bot.- TIP: Use this if you want NON-Discord Admins to have the ability to interact with the bot
- It does honor the role heirarchy set via
Discord -> Server Settings -> Roles
. - Want more control? See Setting up Custom Permissions.
- Use
/server console channel (channel)
and the bot will begin sending AMP Console messages to that channel.- TIP: You can also send AMP Console commands through that Discord Channel to the Dedicated Server.
- ATTENTION: Interacting with the console this way requires a special permission node
server.console.interact
or having Discord Admin and or Bot Moderator Role.
- Use
/server chat channel (channel)
and the bot will begin sending AMP Chat messages to that channel.- TIP: You can also send Chat messages through that Discord Channel to the Dedicated Server.
- User
/server event channel (channel)
and the bot will begin sending AMP Event messages to that channel.- Events are when a player Joins or Leaves and Achievements.
- Use
/whitelist channel (channel)
to set a channel for the bot to check whitelist requests.- ATTENTION: The Bot will not do anything with those requests unless you turn on
auto-whitelist
- ATTENTION: The Bot will not do anything with those requests unless you turn on
- Use
/whitelist auto true
to allow the bot to handle whitelist requests in your whitelist channel!- ATTENTION: The Bot has a default wait time of 5 minutes, after the wait time is up they are whitelisted.
- Use
/whitelist waittime (time)
to adjust the Bot's wait time after a whitelist request.- TIP: You can set this value to
None
or0
to allow the bot to instantly whitelist the user.
- TIP: You can set this value to
-
First, set all your servers settings/information. See Server Commands
- Adjust your settings on via sub commands such as Host
,
Description,
DisplayName,
Prefixand
Whitelist` to name a few. - TIP: You can do this after you set your Display Banner location, the bot will updated the information automatically.
- Adjust your settings on via sub commands such as Host
-
Pick which style of Display you'd like. The Bot supports Discord Embeds or Custom Images.
- Use
/bot banner type (type)
and select the type of display you'd like.
- Use
-
Use
/server display
in the channel you wish to display your Server Status/Info..- TIP: You can pin the messages and thus never moving them!
- ATTENTION: The Bot will update these banners every minute with current AMP and DB Information.
- These are append to the command line when launching the bot. (eg.
start.py -super
)-token
- Bypasse tokens validation check. (Mandatory for AMP Template Installations/Operations)-command
- Enable slash command print statements for user traceback.-super
- This leaves AMP Super Admin role intact, use at your own risk.-dev
- Enable development print statments. (used for development)-debug
- Enables DEBUGGING level for logging. (used for development)-discord
- Disables Discord Intigration (used for testing)
- Log into your dedicated server/VPS via root.
- You are then going to use the following command to create a service script for your Gatekeeper
nano /etc/systemd/system/gatekeeper.service
- Once done, input the following information into the service file.
[Unit]
Description= GateKeeperv2
After= network.service
[Service]
Type= simple
WorkingDirectory= # This points to the directory of Gatekeeperv2 files (eg. '/home/gatekeeper')
ExecStart= #This points to the python3 script. (eg. 'ExecStart=/usr/bin/python3.9 /home/gatekeeper/start.py')
Restart= always
RestartSec= 15
[Install]
WantedBy= multi-user.target
systemctl daemon-reload
systemctl enable gatekeeper.service
systemctl start gatekeeper.service
- Use
systemctl status gatekeeper.service
to see the status of the Gatekeeper Service!
Thanks @LeviN
"Thank You" to everyone at CubeCoders Discord Server, especially IceofWrath, Mike, Greelan and everyone else in their discord.
"Thank You" to everyone over at Discord.py Discord Server, especially SolsticeShard and sgtlaggy for all the silly questions I kept asking about embed's and Hybrid messages!
Visit my Patreon