dolfies / discord.py-self

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

slash commands application id not working #283

Closed lordzuku closed 2 years ago

lordzuku commented 2 years ago

Summary

cannot differentiate between what bots the slash commands originate from

Reproduction Steps

attempted to get the application attribute while passing applications=True kwarg tried with commands in a group & commands not in a group, couldnt get the application snowflake,

also i tried submitting application=snowflake_id kwarg, but got an error then I tried making an empty object with the snowflake as an attribute id

obj.id = snowflake_id application =obj but that also gave an error

Code

async for cmd in self.message.channel.slash_commands(query="ping", applications=True):
    if not cmd.is_group():
        continue
    print(cmd.application)                
    for sub in cmd.children:
        if sub.name != "me":
            continue
        print(sub.application)

Expected Results

expedcted to see the snowflake of the bot querying the results good if there is multiple bots with the same command allowing us to distinguish between them

Actual Results

None

System Information

attempted on both windows pc and linux vps

Checklist

Additional Information

No response

dolfies commented 2 years ago

Yeah, I might've forgotten to parse that :)

lordzuku commented 2 years ago

@dolfies anychance you could fix it <3 If you have a patreon etc idm signing up to for your help

pretty sure its line 196 in iterators.py where it isnt implementing logging the Data from applications

dolfies commented 2 years ago

@dolfies anychance you could fix it <3 If you have a patreon etc idm signing up to for your help

pretty sure its line 196 in iterators.py where it isnt implementing logging the Data from applications

I have it implemented locally but I'm adding/fixing a few more things related to app commands before pushing.

dolfies commented 2 years ago

Implemented.