Skip to content

Just an another discord bot that takes screenshots from websites. Using #Puppeteer

License

Notifications You must be signed in to change notification settings

LeventHAN/ScreenShotJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

ScreenShotJS (GER-SQUAD)

GitHub contributors GitHub release


GitHub issues GitHub pull requests GitHub issues



About

This bot is custom made for German Squad Community

Soon a general multi-purpose bot will be shared. Meanwhile you can take your time and check the code.

Using ScreenShotJS [v. GER.SQUAD]

Usage is simple the bot is using Puppeteer to take screenshots and DiscordJS to connect and show those to in the channel.

Prerequisites

Installation

  1. Clone the repository via your terminal/cmd: git clone https://github.com/11TStudio/ScreenShotJS
  2. Configure the .env.example file. And when done SAVE and delete the .example. (At the end the file should look like: .env)
  3. Run npm install via the terminal.
  4. Start your bot: node index.js&. (I recommend you to use pm2)
  5. Star this repo if you liked!

Configuring ScreenShotJS (GER-SQUAD)

ScreenShotJS (GER-SQUAD) can be configured via .env file which by default is called .env.example.

The config file needs to be called .env at the end and a example can be found below:

# Main Settings
communityName="GER-SQUAD | ger-squad.community"
screenShotTag="search"
screenShotLeaderboardTag="leaderboard"
prefix="!"

# Channel Restriction
channelRestricted=true
statChannel="CHANGE THIS TO YOUR CHANNELID"

# Embed settings false = do not delete / true = delete | timeout is in milliseconds
deleteScreenShots=true
deleteScreenShotsAfter="29000"

# User's Send Message Settings
deleteUsersCommandOnError=true
deleteUsersCommandOnSuccess=false
deleteUsersCommandOnTooFast=true
deleteUsersCommandOnWrongChannel=true

# Tokens
DISCORD_BOT_TOKEN=""

# Visual Settings
footerImg="https://ger-squad.community/images/styleLogo-mobile-370c44e9b3f240ce666358e1e299707154cda826.png"

# Do not change if you want to support me
author="©️ LeventHAN [https://github.com/11TStudio]"
  • communityName - Default For ger-squad.community
  • screenShotTag - Changes the tag name that the bots responds for searching stats of the players
  • screenShotLeaderboardTag - For leaderboard searches. Usage example -!l TOP10 INF MONTH
  • prefix - The symbol/letter that your bot will use, default is !.
  • channelRestricted - You can choose between true and false. false: Players can use the commands everywehere in the servr. true: Will check the channelID (see statChannel) and respond only for that room. It will promt an error if you use it elsewhere.
  • statChannel - The room/channelID that players can use the bot (only works if channelRestricted=true).
  • deleteScreenShots - Toggles the delete function of the bot on/off for the Player Stats Embed (true: on | false: off)
  • deleteScreenShotsAfter - Timeout for the delete in ms
  • deleteUsersCommandOnError - true(default) - false is vice-versa of true
  • deleteUsersCommandOnSuccess - true(default) - false is vice-versa of true
  • deleteUsersCommandOnNotFound - true(default) - false is vice-versa of true
  • deleteUsersCommandOnTooFast - true(default) - false is vice-versa of true
  • deleteUsersCommandOnWrongChannel - true(default) - false is vice-versa of true
  • DISCORD_BOT_TOKEN - Obvius your bot token. You can find out how to get it here: How to make a bot and get token.
  • footerImg - The little logo/image on the footer of each embed.
  • author - The text next to footerImg

Commands and Examples

The following is a list of commands built into SquadJS, you can click their title for more information:

screenShotTag [!s | !search]

Search for players statistics

The search command will automatically screenshot the players stats from your stat page.

Example GIF

Example !search
screenShotLeaderboardTag [!l | !leaderboard]

Check Leaderboard Stats

The leaderboard command usage is as following:


      !leaderboard [TOP10/TOP20/TOP30] [INF/VEH] [ALL/MONTH/WEEK]
      // OR
      !l [TOP10/TOP20/TOP30] [INF/VEH] [ALL/MONTH/WEEK]
      

Example GIF

Example !leaderboard

License

MIT License

Copyright (c) 2021 11T Studio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Just an another discord bot that takes screenshots from websites. Using #Puppeteer

Resources

License

Stars

Watchers

Forks

Packages