#I don't know why's the webhook not working!

1 messages · Page 1 of 1 (latest)

wispy birch
#

So I recently started disnake and gave a shot to webhooks. The code I wrote isn't really doing anything, can someone explain me how do I fix the issue

#
@bot.command()
async def test(ctx) -> None:
    async with aiohttp.ClientSession() as session:
        try:
            webhook = disnake.Webhook.from_url(url='url', session=session)
            await webhook.send('Hello World', username='Foo')
        except Exception as e:
            print(e)```
#
async def foo():
    async with aiohttp.ClientSession() as session:
        webhook = Webhook.from_url('url-here', session=session)
        await webhook.send('Hello World', username='Foo')```
#

none of these code worked/gave any error

half gazelle
#

remove try except