omegadevstudio / selfcord-old Goto Github PK
View Code? Open in Web Editor NEWA discord selfbot API wrapper.
License: MIT License
A discord selfbot API wrapper.
License: MIT License
is there something so i can wait until someone reacts to my message and then edit my message when someone reacted?
Are cogs supported? If so how can i load them?
I was not able to load them the normal way.
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!
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)
whassup, your code is need to be get better
hi, im gonna report some issues of your code to get better
Errors:
Optimization Issues:
Possible Additions:
thx md and google translate
to which token does token = insert token
refer to?
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?
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.
{'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)
The title is very self descriptive.
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
how contact you via discord ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.