#The bot can’t send the giveaway into the channel

1 messages · Page 1 of 1 (latest)

errant yacht
#

have you even read the error?

#

it clearly says duration_seconds is not defined

#

also, why not use a good IDE like VSCode so you can easily find out these errors beforehand

#

send the whole code

#

it is a website you can use from any browser. you that coupled with github repositories and no files even hit your tablet's storage

errant yacht
#

remove lines 3, 4, 5 and put
from datetime import datetime, timedelta
import discord

#

yeah but where are you getting duration_seconds from? it isnt defined

errant yacht
#

idk your code structure, but if the part where you send the embed is in a different function, dont forget to pass it to that function

or make duration_seconds a global variable

#

put global duration_seconds after line 158

#

its not the best solution but idk how you are managing your code

errant yacht
tawny warren
#

?? what

gray olive
#

Lol vscode is technically just a text editor. A ide has features that makes it a development environment tool.

bleak mortar
bleak mortar
#

where do you define the channel?

#

why do you use -> None?

#

Im not sure if that is the issue but try it

gray olive
#

You can define a channel using something like

channel = client.get_channel(channelid)

bleak mortar
#

Can the bot see the channel?

#

and?

#

you already define the channel

#

It doesn´t work if the bot cannot see the channel

gray olive
#

Misspelled author.

#

You put autor

gray olive
#

Hmm maybe try it without the format emb I am not familiar with those but if it works as a regular embed , you know that is your problem maybe.