#converting ticket system to a cog
1 messages · Page 1 of 1 (latest)
Traceback (most recent call last):
File "C:\Users\philc\Desktop\venvs\artybot20\lib\site-packages\discord\ui\view.py", line 371, in _scheduled_task
await item.callback(interaction)
File "c:\Users\philc\Desktop\ABotV2\src\cogs\medbay.py", line 179, in button_two_callback
await bot.get_channel(loaticket.id).send(embed=embed, view=medbaysubmitButtonsView(loaticket))
AttributeError: 'NoneType' object has no attribute 'send```
await bot.get_channel(loaticket.id).send(embed=embed, view=medbaysubmitButtonsView(loaticket))
You have an invalid channel id
dd = await bot.get_guild(id).get_channel(id)
dd.send(embed=embed, view=medbaysubmitButtonsView(loaticket))
Would you like to try this??
Or are missing intents
do you have any idea what you're talking about
Is it an intent issue?
Possibly
Just get the channel using id directly
tried that
Ignoring exception in view <MedbayButtonsView timeout=None children=2> for item <Button style=<ButtonStyle.secondary: 2> url=None disabled=False label='LOA' emoji=None row=None>:
Traceback (most recent call last):
File "C:\Users\philc\Desktop\venvs\artybot20\lib\site-packages\discord\ui\view.py", line 371, in _scheduled_task
await item.callback(interaction)
File "c:\Users\philc\Desktop\ABotV2\src\cogs\medbay.py", line 182, in button_two_callback
dd = await bot.get_guild(881207955029110855).get_channel(loaticket.id)
AttributeError: 'NoneType' object has no attribute 'get_channel'
intents are all enabled
Bro just use get _channel
Don't get the guild
Also if that isnt working try this
ch = await bot.fetch_channel(Id)
Await ch.send(...)
wouldnt it be self.bot...
Idk are u in a cog?
Are u sure the channel is a valid channel ID?
pretty sure
ive worked out the issues
the ticket id is valid
but it doesnt get created in the category
Ok
now its just putting it in the right category now