dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
680 stars 162 forks source link

Jishaku does NOT work with discord.py-self rebase branch #254

Closed theAbdoSabbagh closed 2 years ago

theAbdoSabbagh commented 2 years ago

Summary

title

Reproduction Steps

load jishaku as a cog and import something from it and run your bot

Code

import discord, os, sys, json, asyncio
from discord.ext import commands
from colorama import Fore, init
init()

from jishaku.functools import executor_function

# Bot Prefix
client = commands.Bot(
    command_prefix = '!!!!',
    case_insensitive=True,
    strip_after_prefix=True
)
client.owner_ids = [] # owner ID, not related to the issue but its there
client._BotBase__cogs = commands.core._CaseInsensitiveDict()

@client.listen('on_ready')
async def on_ready():
  os.system('cls')
  print(f"{Fore.GREEN}[!] Bot online.{Fore.RESET}")
  print(f"""{Fore.CYAN}Username: {client.user}
Account ID: {client.user.id}
Server count: {len(client.guilds)}
Users count: {len(client.users)}
""")

os.environ["JISHAKU_NO_UNDERSCORE"] = "True"
os.environ["JISHAKU_FORCE_PAGINATOR"] = "True"
os.environ["JISHAKU_HIDE"] = "True"
os.environ["JISHAKU_NO_DM_TRACEBACK "] = "True"
os.environ["JISHAKU_RETAIN"] = "True"

client.load_extension('jishaku')
client.run("TOKEN")

Expected Results

jishaku should work

Actual Results

Traceback (most recent call last): File "C:\Users\aboud\Desktop\My files\Other\Discord Projects\z Private\My Alt\alt.py", line 6, in from jishaku.functools import executor_function File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\jishaku__init.py", line 15, in from jishaku.cog import * # noqa: F401 File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\jishaku\cog.py", line 16, in from jishaku.features.filesystem import FilesystemFeature File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\jishaku\features\filesystem.py", line 26, in from jishaku.paginators import PaginatorInterface, WrappedFilePaginator, use_file_check File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\jishaku\paginators.py", line 23, in from jishaku.shim.paginator_200 import PaginatorEmbedInterface, PaginatorInterface File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\jishaku\shim\paginator_200.py", line 17, in from discord import ui ImportError: cannot import name 'ui' from 'discord' (C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\init__.py)

System Information

doesnt work

Checklist

Additional Information

No response

TheOnlyWayUp commented 2 years ago

Would be nice if you could codeblock your errors next time but no issue

ImportError: cannot import name 'ui' from 'discord' (C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\discord_init_.py)

Jishaku is meant for discord.py, after discord.py updated to have Views, so did Jishaku, the version of Jishaku you're using is meant for discord.py 2.0, which has discord.ui and other classes.

Please try using an older version of Jishaku (one that's meant to be used with discord.py 1.7.3) and let us know if it works.

dolfies commented 2 years ago

Indeed it does not. This is not a lib bug.

I might maintain a fork of it eventually (the fork I have right now is not for selfbots).