Faultybot Discord Handler
Project description
Faultybot
Technical fundamentals
To use the bot you need a Discord bot and a Lichess account. We recommend creating another new account for this purpose. The account is only important if you want to kick people. Otherwise you don't need a Lichess account. The presence of Python is required.
Create a Discord bot
Lichess bots can be created on the Discord Developer page. Since this is a different topic, we recommend the video from freeCodeCamp. It is linked at the end of this text. Of course, the bot must also be invited to their server and be able to write there. But this is your responsibility. YouTube Video about Discord Bots
Lichess Bot
If you decide to use a Lichess bot, you will need to generate an OAuth2 token or an API token. Actually it doesn't matter what rights it has. However, for the project at hand, it must have the right to act in the team.
team:write
Installing the bot
Clone git
You can download the git simply by using the command git clone. Please use the master branch
git clone https://github.com/jplight/faultybot.git
Pip install
Actually, pip should already be there. If this is not the case, I will give a short instruction here. Simply copy the following commands into a shell or CMD. The instructions are only for Windows users. Linux and Mac users know everything better and therefore don't need them.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Installation of the pip suspensions
This is also done with a simple console input.
pip install -r client\requirements.txt
Please note that the requirements file is located in the subfolder client.
Creating the Config File
Create a file named ftpdata.py in the subfolder client. Please use the syntax below and enter your values. You can obtain the FTP data from your website hoster. They are needed to transfer the cheater lists to the server.
# FTP
user = "DATA"
pwd = "DATA"
port = "DATA"
url = "DATA"
# Lichess
bot_token = "DATA"
Server Config
I assume at this point that you own a web server and know how to use it.
Upload Files
Please upload the files from the Server folder to the Web Server. PHP7 (, JavaScript and CSS as well as SCSS) are required there. However, this is by far not a special feature. I write the JS files here because there are hosters who reject these file formats. I am aware that CSS and JS are executed locally.
FTP scope
Create another FTP account. This should only have access to the flag folder. This data is important for the config file created earlier. The bot then creates a *.txt file and writes it to the server via FTP. This would otherwise be too much for the output. That's about it. The bot automatically generates the links and then sends them to the user via a message.
How to use the bot
To view all players who have violated the TOS, write the following in the chat with the bot. The bot only searches for new cheaters every 4 hours after the last call. That would otherwise generate too much traffic. The flag "new" can be used to circumvent this.
>faulty >>TEAM-ID<<
However, if they want to kick players, write the following:
>kickfaulty >>TEAM-ID<< >>TOKEN<<
Please note that only one token can be uniquely assigned to a bot at a time. This bot must then also be TeamLeader in the desired team. This means that you cannot kick people all over the place. You can only do that in your teams.
Have Fun
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file faultybot-0.0.2.tar.gz
.
File metadata
- Download URL: faultybot-0.0.2.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 643bb36a7fdb50372d629a593828a5a7c80b729163f13d00d20e7948129e03c6 |
|
MD5 | 621f915814a7b346e561a83a22186502 |
|
BLAKE2b-256 | 93668a89d82d0084fc425594f7c7db74a0e1b8a398a8f72a51e9a03fb44d7115 |
File details
Details for the file faultybot-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: faultybot-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72a944cc0b1c50130285206162baed2be615eef30b7c0f463259b293e81bf9a7 |
|
MD5 | 75cc69ee7e49a7d553132e5dfbd54e82 |
|
BLAKE2b-256 | 86542cab26ea00697dcbad212c730527a144a7a5f102307127b1775c5dd6f1b5 |