A Discord bot that provides information on LAN Play servers, players, and games played.
- Get API Key
- Create a Bot Account
- Invite the bot into your server
- Run the Bot
- Commands Available
- Contributing
- License
- Star History
To use the LanPlay package you will need a specific, non-transferable API key that can be retrieved from LanPlay.
Please follow these steps :
-
Open a Web Browser and go to http://www.lan-play.com
-
Open a Console Mode (Ctrl + Shift + C or F12 should work, or Google is your friend to find how to access the Console Mode đź« )
-
Go to
Network
tab and refresh the current page -
Search a line named
getMonitors
and click on it -
Open the
Payload
tab -
Copy the
api_key
value and store it in safe location for the Run the Bot step.
-
Make sure you’re logged on to the Discord website.
-
Navigate to the Discord Application for developers.
-
Click on the
New Application
button. -
Give the application a name and click
Create
. -
Navigate to the
Bot
tab to configure it. -
Make sure that
Public Bot
is ticked if you want others to invite your bot.- You should also make sure that
Require OAuth2 Code Grant
is unchecked.
- You should also make sure that
-
Copy the token using the
Copy
button and store it in safe location for the Run the Bot step.-
This is not the Client Secret at the General Information page.
It should be worth noting that this token is essentially your bot’s password. You should never share this with someone else. In doing so, someone can log in to your bot and do malicious things, such as leaving servers, ban all members inside a server, or pinging everyone maliciously.
The possibilities are endless, so do not share this token.
If you accidentally leaked your token, click the
Regenerate
button as soon as possible. This revokes your old token and re-generates a new one. Now you need to use the new token to login.
-
-
Navigate to the Discord Application for developers.
-
Open the App you previously created for the Bot.
-
Navigate to
OAuth2
tab. -
Scroll down and in
OAuth2 URL Generator
->SCOPES
, tick these boxes:bot
applications.commands
-
Scroll down and in
BOT PERMISSIONS
, tick these boxes:Manage Expressions
Create Expressions
Send Messages
Send Messages in Threads
Embed Links
Read Message History
-
Make sure that
INTEGRATION TYPE
value isGuild Install
. -
Copy/Paste the
GENERATED URL
at bottom to a new Browser Tab and add it to your Discord Server.
-
Download Docker and install it on your computer.
-
Make sure you got both api_key and token values, and invited the bot to your server.
-
Open a Windows Terminal and execute the following command to run the Discord Bot:
docker run -e API_LAN_KEY=<your_lan_api_key> -e TOKEN=<your_discord_token> garohrl/lanplay-discordbot:latest
- If you want the Discord Bot running in background:
docker run -d -e API_LAN_KEY=<your_lan_api_key> -e TOKEN=<your_discord_token> garohrl/lanplay-discordbot:latest
Replace
<your_lan_api_key>
with yourapi_key
and replace<your_discord_token>
with yourtoken
.
Command | Input | Output | Permission |
---|---|---|---|
/help |
None |
Everybody |
|
/lan |
select a server | Everybody |
|
/add |
server e.g. 'tekn0.net:11451' |
Admin |
|
/delete |
server e.g. 'tekn0.net:11451' |
Admin |
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/NewFeature
) - Commit your Changes (
git commit -m 'Add some NewFeature'
) - Push to the Branch (
git push origin feature/NewFeature
) - Open a Pull Request
Thanks to every contributors who have contributed in this project.
Distributed under the MIT License. See LICENSE for more information.
Author/Maintainer: Garoh | Discord: garohrl