Button press out of cache. #1029
-
Hello! I am working with buttons. Is there a way I could respond to button presses that are not in cache? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Have you tried using persistent views for the first question? https://github.com/Pycord-Development/pycord/blob/master/examples/views/persistent.py For the second, you can use the |
Beta Was this translation helpful? Give feedback.
Have you tried using persistent views for the first question? https://github.com/Pycord-Development/pycord/blob/master/examples/views/persistent.py
For the second, you can use the
on_interaction
event, or (preferably) just use theinteraction
variable declared in the button callback. I'd also recommend either using the button decorator or subclassing Button instead of directly assigning to the callback as it gives you more flexibility. E.g. https://github.com/Pycord-Development/pycord/blob/master/examples/views/confirm.py