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

Application.create_bot() - 'str' object does not support item assignment #387

Closed slayernominee closed 1 year ago

slayernominee commented 1 year ago

Summary

Application.create_bot() - 'str' object does not support item assignment

Reproduction Steps

app = await self.client.create_application(name) # works in my case bot_app = await app.create_bot() # creates the error

''' 'str' object does not support item assignment '''

Code

try:
            app = await self.client.create_application(name)
        except Exception as e:
            print(sty.fg.red + str(e) + sty.fg.rs)
            await ctx.send('Failed to create an application')
            return
        try:
            bot_app = await app.create_bot()
        except Exception as e:
            print(sty.fg.red + str(e) + sty.fg.rs)
            await ctx.send('Failed to create an bot to the application, the application was successfully created ...')
            return
        print('before token ...')
        token = await bot_app.reset_token()

Expected Results

should give me a ApplicationBot Object back instead of the error

Actual Results

well, it gives me the ''str' object does not support item assignment' error

System Information

Checklist

Additional Information

No response

dolfies commented 1 year ago

Discord changed how these endpoints worked and the fix has been part of an ever-growing stash I haven't finished yet. I'll just commit this separately.