Giter VIP home page Giter VIP logo

discord-steam-verification's Introduction

DSV logo

Discord Steam Verification

Verify your Discord server members and check if they have specified app on their Steam library! Give them roles on successfull verification and punish them if they don't have it in their library!

๐Ÿšง This bot has power to kick or ban your users if they can't verify themselves. Please use it on your own risk and make sure to run some tests before using it on your server!

Please make sure to read all of the README.md (this) file before starting to use the bot.

๐Ÿ”ฅ Features

  • Steam authentication; users will be asked to login to their Steam account to check their library.
  • NEW Multiple Steam APP verification: You can check for more than one app in user's library!
  • Everything is customizable!
    • Fully customizable strings; access to string files easily and translate the entire bot, API and website to your language!
    • Multiple roles that will be given to user on successfull login!
    • Custom punishments for users who doesn't have the specified app in their Steam library! You can choose between two options, kick or ban the user if they are trying to access your server without having the required app/game!
  • Backups! Automatic or not! Set it as you wish and leave the rest to the bot. Bot will read your settings and it'll back up the queue and Steam ID array so you won't lose your stuff when you restart your bot! Keep in mind you'll have to use the import command to import the backup file after every first start to load your backup.
  • Able to store Steam IDs in an array so it won't let users use the same Steam account for different Discord accounts.
  • API and website ready for production! Specially designed API, multiple endpoints, Steam authentication and simple website UI.

โ“ How does it work

When a user joins to your server, bot will check if they somehow got the sucess roles. If they have it, bot won't do anything. But if they don't have the specified roles, it'll start the verification process and send the user a message including your API's URL.

image

The user will be asked to login to their Steam account and then they'll see this page:

verification_page

The time they click "Yes", they'll send a POST request to another route and it'll send a request to Steam's API to get user's games list, and it'll try to find the specified application ID(s) in user's library.

If API finds the application(s) in their library, it'll fire a successfull verification event so bot will get the signal and continue the progress. If user doesn't have the item(s), same way API will fire a failure event and bot will check your penalty settings. It'll kick the user if it's set to kick and it'll ban the user if it's set to ban. Don't worry, you can choose not to do anything or bypass the user with bypass command.

When user that is in the verification queue leaves the server, they'll be removed from the queue automatically. Bot will notify you when user's DMs are disabled so you will know which users didn't get the message.

If API can't reach the data, it'll show an error box to the user with the message you specified to tell them that they got some issues with their profile (it's mostly caused when profile is set to private). YES user needs to have a public Steam profile so bot API can check the user's library.

That's all, but please do not forget this is not the "best version" of what you want. You may be looking for a better product but you're very welcome to contribute! I'll be looking forward to your pull request and bug reports! Please feel free to get in contact with me from my website and check out m other projects too!

โš  Caution! This project has no database so all of you could easily setup and start using the project, you can edit your clone to have a database or wait for me to create another branch with a version that includes database connection. Your verification queue will be lost unless you back it up with command or auto-backup feature when you restart the bot or something happens. And your settings won't be available until you restart the bot! So make sure to set your config and everything, test it on a private server and then start using it on your main server! If you are looking for a way to prevent scam accounts and verify all new members, you may take a look at this bot.

๐Ÿ›  Requirements

This bot requires Node.js, TypeScript, pnpm, a Discord Bot Application, Steam API Key and a Node.js hosting service (e.g. Hop.io, Railway, Fly.io) to install.

๐Ÿ’ก Make sure to enable "Message Content Intent" & "Server Members Indent" in your bot's application page in Discord Developer Portal.

image

๐Ÿ“ฉ Installation

  • Clone this repository: git clone https://github.com/eggsydev/discord-steam-verification
  • Install modules with pnpm
    • cd to your clone folder.
    • Type pnpm i in your terminal.
  • Edit the config.example.ts file in src/ directory as you wish. Rename the file to config.ts after you're finished.
  • Copy the content of .env.example, fill the fields and rename it to .env (all fields are explained in comments, make sure to put the right app ID(s)).
  • Start the bot in development or production mode.
    • For development, type this in your terminal: pnpm dev
    • For production, follow these steps:
      • Compile the code with: pnpm build
      • Start the compiled code: pnpm start

You will now have your very own discord-steam-verification bot and API running! Invite your bot to your server and it'll start verifying new users!

๐Ÿ› Bugs

Please create an issue!

๐Ÿ’– Sponsors

discord-steam-verification's People

Contributors

dependabot[bot] avatar eggsy avatar mertbhey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discord-steam-verification's Issues

[FEATURE REQUEST]

Have you checked the features section before making a request?

  • Yes
  • No

Are you sure if we add this feature, users will be happy about it?

  • Yes
  • No
  • Maybe

Is this related to a problem, if so, please describe:
No, it's not.

Now tell me what's your suggestion
Would it be possible to add multiple APP_ID i.e our community runs Ark & rust servers so it would be good to check if they have either.

Document verify command usage

Have you checked the features section before making a request?

  • Yes
  • No

Are you sure if we add this feature, users will be happy about it?

  • Yes
  • No
  • Maybe

Is this related to a problem, if so, please describe:
No, it's not.

Now tell me what's your suggestion
I guessed that !verify is a command, but I don't know its usage. I thought the purpose of this bot was to add a role.

Examples (screenshots etc.) and additional context
image

Bot is inactive and won't respond

yes I have read the readme, and the issues already posted, followed them exactly, my bot will come online, but it won't respond to anything and gives me no errors.

[BUG] ERROR Couldn't add the role (955151821461131386) to the user xxx.

I have read all of the README file and checked if this was reported before

  • Yes, I did.
  • No, let me check.

Describe the bug
When a user tries to verify themselves in our Discord-server, I'm getting this error:

ERROR Couldn't add the role (955151821461131386) to the user xxx.

The role ID is correct and does exist on the server. My bot has every permission and also has the Admin-permission...

To Reproduce
Steps to reproduce the behavior:

  • Join my server as a new user
  • Getting the message to verify yourself
  • Verifying myself with the verify-link I get in PM
  • Getting the message ":tada: You have successfully passed verification. Congrats and enjoy our server!"
  • Look at the console from nodejs, there you will find the error.

Expected behavior
Getting my "Verified" role.

Screenshots
image

System information (required if it's an issue about API or website):

  • OS: Ubuntu 20.04.4 LTS
  • Browser: Google Chrome
  • Version: latest version of discord-steam-verification
  • Node.JS version: v10.19.0

Additional context

[BUG] guildMemberAdd event issues

I have read all of the README file and checked if this was reported before

  • Yes, I did.
  • No, let me check.

Describe the bug
Bot Guild Member Add Event isnt working.

To Reproduce
Steps to reproduce the behavior:

  • Go to src/events folder
  • Open guildMemberAdd.js file
  • You'll see that its not working

Bug Web

Error: Failed to lookup view "main" in views directory "/root/hariaadminsuite/dist/views"

SSL

Not an issue with the bot! The bot itself works great.

How would one add an SSL to it?

Thanks

[BUG] doesn't work

nop
doesn't work
And it would be nice to have a detailed explanation about role assignment.

[BUG] Failed to start on windows server 2016 | Node JS v18.14.0

I have read all of the README file and checked if this was reported before

  • Yes, I did.

Describe the bug
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loade
r. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
โ†[90m at new NodeError (node:internal/errors:399:5)โ†[39m
โ†[90m at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)โ†[39m
โ†[90m at defaultResolve (node:internal/modules/esm/resolve:1135:3)โ†[39m
โ†[90m at nextResolve (node:internal/modules/esm/loader:163:28)โ†[39m
โ†[90m at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)โ†[39m
โ†[90m at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)โ†[39m
โ†[90m at ESMLoader.import (node:internal/modules/esm/loader:525:22)โ†[39m
โ†[90m at importModuleDynamically (node:internal/modules/cjs/loader:1159:29)โ†[39m
โ†[90m at importModuleDynamicallyWrapper (node:internal/vm/module:429:21)โ†[39m
โ†[90m at importModuleDynamically (node:internal/vm:102:46)โ†[39m
โ†[90m at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)โ†[39m
at โ†[90mC:\Users\admin\Desktop\discord-steam-verification\โ†[39mdist\index.js:345:78
at Array.forEach ()
at API.loadEndpoints โ†[90m(C:\Users\admin\Desktop\discord-steam-verification\โ†[39mdist\index.js:342:17โ†[90m)โ†[39m
at new API โ†[90m(C:\Users\admin\Desktop\discord-steam-verification\โ†[39mdist\index.js:330:10โ†[90m)โ†[39m
at new Main โ†[90m(C:\Users\admin\Desktop\discord-steam-verification\โ†[39mdist\index.js:567:16โ†[90m)โ†[39m
at Object. โ†[90m(C:\Users\admin\Desktop\discord-steam-verification\โ†[39mdist\index.js:570:1โ†[90m)โ†[39m
โ†[90m at Module._compile (node:internal/modules/cjs/loader:1226:14)โ†[39m
โ†[90m at Module._extensions..js (node:internal/modules/cjs/loader:1280:10)โ†[39m
โ†[90m at Module.load (node:internal/modules/cjs/loader:1089:32)โ†[39m
โ†[90m at Module._load (node:internal/modules/cjs/loader:930:12)โ†[39m
โ†[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)โ†[39m
โ†[90m at node:internal/main/run_main_module:23:47โ†[39m {
code: โ†[32m'ERR_UNSUPPORTED_ESM_URL_SCHEME'โ†[39m
}

Node.js v18.14.0

[FEATURE REQUEST]

Have you checked the features section before making a request?

  • Yes
  • No

Are you sure if we add this feature, users will be happy about it?

  • Yes
  • No
  • Maybe

Is this related to a problem, if so, please describe:
No, it's not.

Now tell me what's your suggestion
Message the log channel if the user has any ban's on their account. This will help admins identify players that could possibly cheat.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.