Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
slayernominee opened this issue Sep 25, 2022 · 1 comment
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@slayernominee
Copy link

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

  • Python v3.10.6-final
  • discord.py-self v2.0.0-alpha
    • discord.py-self pkg_resources: v2.0.0a2
  • aiohttp v3.8.1
  • system info: Linux 5.18.19-3-MANJARO ✨ add trusted users kwarg to bot class #1 SMP PREEMPT_DYNAMIC Tue Aug 23 15:56:13 UTC 2022

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@slayernominee slayernominee added the unconfirmed bug Unconfirmed bug label Sep 25, 2022
@dolfies dolfies added bug Something isn't working and removed unconfirmed bug Unconfirmed bug labels Sep 25, 2022
@dolfies
Copy link
Owner

dolfies commented Sep 25, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants