Coder Social home page Coder Social logo

discord-bot's Introduction

Server Scout (Discord Bot)

DeepSource

This is a Discord bot that I made for my friends and me to use in our Discord server. It is a work in progress, and I will be adding more features as time goes on.

Features

  • Able to very quickly find servers based on a filter
  • Able to scan ip ranges for servers from discord
  • List players that are currently online on a server
  • List streamers that are currently streaming on a server
  • Show stats about the database
  • Attempt to join premium servers to test a whitelist
  • Quickly scan all ipv4 addresses for servers (separate program)
  • Server information:
    • Version (name/protocol)
    • Players (online/max/uuids)
    • Is Cracked or Premium
    • Is modded
    • Host organization
    • Geolocation
    • Whitelist

Setup

Follow the instructions here to set up the bot and db.

TODO

  • Make it work well

Commands

Click to show all commands

Find

/find <filter>:<value>

This command will find a server based on the filter and value you give it. You can use multiple filters at once, and the bot will find a server that matches all of them.

Stats

/stats

This command gives stats about the database

Graph

/graph

This command will show you a graph of various statistics about the server.

Streamers

/streamers

This command will show you a list of all the streamers that are currently streaming on a server in the database.

Scanner

/scan <file> <dilimiter>

This command will take a file of ip ranges (10.0.0.0/32, 127.0.0.0/24, ...) separated by a delimiter (, ;) and scan them for servers.

Ping

/ping

This command will show you information about a provided server.

Help

/help

This command will show you a list of all the commands and how to use them.

Filters

  • ip - An ip range in the subnet mask format like 127.0.0.0/32
  • version - The version of the server either as a name like 1.16.5 or as an id like 754
  • max_players - The maximum number of players the server can hold
  • online_players - The number of players currently online
  • logged_players - The number of players that have logged into the server
  • player - The name or uuid of a player that has logged into the server either as an uuid or name
  • sign - The text on a sign
  • description - The text in the description of the server matched via RegEx
  • cracked - Whether the server is cracked
  • has_favicon - Whether the server has a favicon
  • country - The country the server is in

Documents

The docs are in the following json format:

Click to show example doc
{
  "_id": {
    "$oid": "1534978d9f542e403cfa5026"
  },
  "description": {
    "text": "A Minecraft Server"
  },
  "enforcesSecureChat": null,
  "hasFavicon": false,
  "hasForgeData": true,
  "ip": "127.0.0.1",
  "lastSeen": 1682995170,
  "cracked": false,
  "players": {
    "max": 20,
    "online": 1,
    "sample": [
      {
        "id": "c0a80001-0000-0000-0000-000000000000",
        "name": "Player",
        "lastSeen": 1234567890
      }
    ]
  },
  "port": 25567,
  "version": {
    "name": "1.16.5",
    "protocol": 754
  },
  "modpackData": {},
  "preventsChatReports": false,
  "previewsChat": false,
  "forgeData": {},
  "geo": {
    "lat": 0,
    "lon": 0,
    "city": "",
    "country": "",
    "hostname": ""
  }
}

Legal

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more

Terms of service

Privacy Policy

Q/A

  • Am I sus?
    • Maybe

discord-bot's People

Contributors

deepsource-autofix[bot] avatar pilot1782 avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

rpyro

discord-bot's Issues

test 3

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

test 7

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Test Issue

Describe the bug
ur mom

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

test 4

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

test 6

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

bot handler not working

Describe the bug
When i try to run bothandler i get an error

To Reproduce
Steps to reproduce the behavior:`
1 use Python 3.10.13
2 Try Running BotHandler.py

Desktop:

  • OS: Ubuntu 20.04.6 LTS

`

Updating files

Uninstalling reqs
WARNING: Skipping mcstatus as it is not installed.
WARNING: Skipping pymongo as it is not installed.
WARNING: Skipping aiohttp as it is not installed.
WARNING: Skipping asyncio as it is not installed.
Found existing installation: requests 2.22.0
Not uninstalling requests at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'requests'. No files were found to uninstall.
Found existing installation: cryptography 2.8
Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'cryptography'. No files were found to uninstall.
WARNING: Skipping ipinfo as it is not installed.
WARNING: Skipping netaddr as it is not installed.
WARNING: Skipping minecraft-data as it is not installed.
WARNING: Skipping plotly as it is not installed.
WARNING: Skipping country-converter as it is not installed.
WARNING: Skipping kaleido as it is not installed.
WARNING: Skipping discord-py-interactions as it is not installed.
WARNING: Skipping pytest as it is not installed.
WARNING: Skipping interactions-dynamic-help as it is not installed.

Installing reqs
Collecting mcstatus~=11.1
Using cached mcstatus-11.1.0-py3-none-any.whl (37 kB)
Collecting pymongo~=4.6
Using cached pymongo-4.6.1-cp38-cp38-manylinux2014_x86_64.whl (716 kB)
Collecting aiohttp~=3.9
Using cached aiohttp-3.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
Collecting asyncio~=3.4
Using cached asyncio-3.4.3-py3-none-any.whl (101 kB)
Collecting requests~=2.31
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting cryptography~=41.0
Using cached cryptography-41.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)
Collecting ipinfo~=5.0
Using cached ipinfo-5.0.0-py3-none-any.whl (24 kB)
Collecting netaddr~=0.9
Using cached netaddr-0.9.0-py3-none-any.whl (2.2 MB)
Collecting minecraft_data~=3.20
Using cached minecraft_data-3.20.0.tar.gz (5.9 MB)
Collecting plotly~=5.18
Using cached plotly-5.18.0-py3-none-any.whl (15.6 MB)
Collecting country_converter~=1.2
Using cached country_converter-1.2-py3-none-any.whl (45 kB)
Collecting kaleido~=0.2
Using cached kaleido-0.2.1-py2.py3-none-manylinux1_x86_64.whl (79.9 MB)
ERROR: Could not find a version that satisfies the requirement discord-py-interactions~=5.11 (from -r Discord-Bot-main/Discord-Bot-dev-builds/requirements.txt (line 13)) (from versions: 3.0.2, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.2.0, 4.2.1, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.4.0, 4.4.1)
ERROR: No matching distribution found for discord-py-interactions~=5.11 (from -r Discord-Bot-main/Discord-Bot-dev-builds/requirements.txt (line 13))

Running
Time remaining until midnight: 18518.877041 sec
/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.1.0) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
File "Discord-Bot-main/Discord-Bot-dev-builds/main.pyw", line 13, in
from interactions import (
ModuleNotFoundError: No module named 'interactions'
1 - Exited
Traceback (most recent call last):
File "/home/marcos10pc/Discord-Bot/botHandler.py", line 56, in webhook_send
requests.post(
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '...': No scheme supplied. Perhaps you meant https://...?

Traceback (most recent call last):
File "/home/marcos10pc/Discord-Bot/botHandler.py", line 233, in main
with open("log.log", "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'log.log'

Traceback (most recent call last):
File "/home/marcos10pc/Discord-Bot/botHandler.py", line 233, in main
with open("log.log", "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'log.log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/marcos10pc/Discord-Bot/botHandler.py", line 56, in webhook_send
requests.post(
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/marcos10pc/.local/lib/python3.10/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '...': No scheme supplied. Perhaps you meant https://...?

Restarting after 90 sec

`

Test Issue 2

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

help

masscan-master>make
process_begin: CreateProcess(NULL, cc -dumpmachine, ...) failed.
Makefile:16: pipe: No error
fatal: not a git repository (or any of the parent directories): .git
cc -g -ggdb -Wall -O2 -c src/crypto-base64.c -o tmp/crypto-base64.o
process_begin: CreateProcess(NULL, cc -g -ggdb -Wall -O2 -c src/crypto-base64.c -o tmp/crypto-base64.o, ...) failed.
make (e=2): ═х єфрхЄё  эрщЄш єърчрээ√щ Їрщы.
make: *** [Makefile:109: tmp/crypto-base64.o] Error 2

Not scanning

Describe the bug
Prints out some ip ranges in the console, than prints out "queue is empty, sleeping" over and over.

To Reproduce
Run the scanner as root on WSL

Expected behavior
Well, fill the queue with ips

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 22H2, WSL

test 5

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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.