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 161 forks source link

Embeds not working? #384

Closed unrealcurry closed 1 year ago

unrealcurry commented 1 year ago

Summary

When trying to post a message with an embed, it says that "embed" is not an argument.

Reproduction Steps

Hello. I was making a simple command for my self-bot. When I tried to post the embed, it says that embed is not a parameter. Is this some sort of bug where embeds cannot be posted, or is it just me?

Code

import selfcord
from selfcord.ext import commands

client = commands.Bot(
    command_prefix = 'tinman: ',
    self_bot = True 
)

cogs = [
    ''
]

for cog in cogs:
    client.load_extension(cog)

@client.event
async def on_ready():
    print("User bot is ready!")

@client.command()
async def hello_world(ctx: commands.Context):
    await ctx.send(
        embed = selfcord.Embed(
            title = "Just an embed",
            description = "the description of embed",
            colour = selfcord.Colour.blue()
        )
    )

Expected Results

The embed will be posted

Actual Results

The embed was not posted, instead throwing an error:

Ignoring exception in command hello_world:
Traceback (most recent call last):
  File "C:\Users\junej\AppData\Local\Programs\Python\Python310\lib\site-packages\selfcord\ext\commands\core.py", line 192, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\Users\junej\Downloads\Bot Test\Bot\main.py", line 22, in hello_world
    await ctx.send(
TypeError: Messageable.send() got an unexpected keyword argument 'embed'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\junej\AppData\Local\Programs\Python\Python310\lib\site-packages\selfcord\ext\commands\bot.py", line 1166, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\junej\AppData\Local\Programs\Python\Python310\lib\site-packages\selfcord\ext\commands\core.py", line 932, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "C:\Users\junej\AppData\Local\Programs\Python\Python310\lib\site-packages\selfcord\ext\commands\core.py", line 201, in wrapped
    raise CommandInvokeError(exc) from exc
selfcord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: Messageable.send() got an unexpected keyword argument 'embed'

System Information

Ran: python -m selfcord -v Returned:

- Python v3.10.2-final
- selfcord.py v2.0.0-alpha
    - selfcord.py pkg_resources: v2.0.0a2
- aiohttp v3.7.4.post0
- system info: Windows 10 10.0.19044

Checklist

Additional Information

No response

dolfies commented 1 year ago

Selfbots can no longer send embeds