#buttens dont work after restart

1 messages · Page 1 of 1 (latest)

pale sparrow
minor tinsel
hot thunder
#

collectors are destroyed once you restart your bot, if you need persistency you should try doing this inside the interactionCreate event

gleaming forgeBOT
#

Tag suggestion for @pale sparrow:
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.

client
    .on("debug", console.log)
    .on("warn", console.log)

• Note: if you initialize your Client as bot or other identifiers you need to use these instead of client
• If the output is too long to post consider using a bin instead: gist | hasteb.in | sourceb.in | hastebin

pale sparrow
#

ok but i dont want to renew it all the time

slow mortar
#

Use the interactionCreate event instead of a collector

marsh geyser
slow mortar
#

No check out the event mentioned in the guide

minor tinsel
slow mortar
#

It doesn't matter which kind of interaction you use... it's the same event

#

Scroll down in the sidebar you will find a section for buttons

pale sparrow
#

but do i have to put the whole code in the interectioncreate

pale sparrow
#

ok but i use command handelers

marsh geyser
pale sparrow
#

from there?

marsh geyser
pale sparrow
#

ok