GithubHelp home page GithubHelp logo

omegadevstudio / selfcord-old Goto Github PK

View Code? Open in Web Editor NEW
41.0 4.0 17.0 3.49 MB

A discord selfbot API wrapper.

License: MIT License

Python 100.00%
discord discord-api discord-api-wrapper discord-hack discord-selfbot discord-wrapper selfbot bot discord-bot python

selfcord-old's People

Contributors

3ur avatar bl-irtus avatar celsusdb avatar codecnomad avatar cookie-is-yummy avatar cycno avatar dependabot[bot] avatar faten848 avatar gngp avatar havesechs avatar lopekinz avatar mildthrone avatar shell1010 avatar shellsdaddy avatar thegigadev 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

Watchers

 avatar  avatar  avatar  avatar

selfcord-old's Issues

IndexError encountered in SelfCord’s _get_build_number function

I’m using the SelfCord library in Python 3.11 and I’ve encountered an issue. When I try to run my bot with the bot.run(config["token"], log_handler=handler) command, I get an IndexError: list index out of range error.
The traceback indicates that the error originates from the _get_build_number function in selfcord\utils.py. Here’s the relevant part of the traceback:

File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\utils.py", line 1480, in _get_build_number
build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js'
IndexError: list index out of range

It seems like the regular expression re.compile(r'assets/+([a-z0-9]+).js').findall(login_page) is not finding enough matches in login_page, and when it tries to access the penultimate element with [-2], it throws an IndexError.

I’m not sure how to resolve this issue. Any help would be greatly appreciated. Thank you!

Interfering

PS D:\Coding\Discord Bots\AccBots> python '.\Acc Grabber.py'
Traceback (most recent call last):
File ".\Acc Grabber.py", line 1, in
import selfcord
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord_init_.py", line 2, in
from .api import *
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord\api_init_.py", line 2, in
from .gateway import Activity, gateway
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord\api\gateway.py", line 13, in
from selfcord.models.client import Client
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord\models_init_.py", line 2, in
from .channel import (Category, DMChannel, GroupChannel, Messageable,
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord\models\channel.py", line 15, in
from ..utils import logging
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord\utils_init_.py", line 2, in
from .command import (Command, CommandCollection, Context, Event, Extender,
File "C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selfcord\utils\command.py", line 8, in
from typing import TYPE_CHECKING, Any, get_origin
ImportError: cannot import name 'get_origin' from 'typing' (C:\Users\byron\AppData\Local\Programs\Python\Python37-32\lib\typing.py)
PS D:\Coding\Discord Bots\AccBots>

import selfcord

token = "MY TOKEN"
bot = selfcord.Bot()

@bot.on("ready")
async def ready(time):
    print(f"Connected To {bot.user.name}\n Startup took {time:0.2f} seconds")

@bot.on("message")
async def responder(message):
    if message.content == "ping!":
        await message.channel.send("pong!")

bot.run(token)

optimization and bug rep

whassup, your code is need to be get better

hi, im gonna report some issues of your code to get better

Errors:

  • line 42: there is a typo in the README file
  • line 74: a function that is supposed to return the desired result is not working correctly
  • line 102: i think there is a security vulnerability in the database connection

Optimization Issues:

  • line 125: certain loops are unnecessarily repeated
  • line 152: performance issues have been identified and some operations can be done faster

Possible Additions:

  • line 189: implement a feature for users to upload profile pictures
  • line 215: enhance the private messaging functionality
  • line 242: write automated tests

thx md and google translate

possibility to use slash commands

hi, is it possible to use slash commands when i use a certain cmd. like if i do !farm that it does something like /farm in the channel?

Variable Scope

In bot.py, the Bot class uses a "user" member but that's assigned only in the "runner" function so is inaccessible in other functions where referenced (ie. get_guild)
image

Docstrings and type hints do not show

Docstrings and Type hints does not show for selfcord as of right now on my end, and I'm assuming on other users ends too. If you guys can help me find a solution this will be helpful.

'401: Unauthorized'

{'message': '401: Unauthorized', 'code': 0} -- 401
{'message': '401: Unauthorized', 'code': 0}
Error related to initial run
['Traceback (most recent call last):\n', ' File "C:\Python311\Lib\site-packages\selfcord\bot.py", line 102, in run\n asyncio.run(runner())\n', ' File "C:\Python311\Lib\asyncio\runners.py", line 190, in run\n return runner.run(main)\n ^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\asyncio\runners.py", line 118, in run\n return self._loop.run_until_complete(task)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete\n return future.result()\n ^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\bot.py", line 90, in runner\n data = await self.http.static_login(token)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\api\http.py", line 48, in static_login\n self.client = Client(data)\n ^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\models\client.py", line 21, in init\n self._update(UserPayload)\n', ' File "C:\Python311\Lib\site-packages\selfcord\models\client.py", line 35, in _update\n self.name = data.get("username")\n ^^^^^^^^\n', "AttributeError: 'NoneType' object has no attribute 'get'\n"]

import selfcord

token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
bot = selfcord.Bot()

@bot.on("ready")
async def ready(time):
print(f"Connected To {bot.user.name}\n Startup took {time:0.2f} seconds")

@bot.on("message")
async def responder(message):
if message.content == "ping!":
await message.channel.send("pong!")

bot.run(token)

Documentation

can i make documentation for this?
started using it yesterday and expected it to be similar to discord.py, but it's vastly different, finding my way around so far and want to help with the documentation

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.