wrightedu / CSE-Discord-Bot

Discord bot for the WSU CSE Discord server
GNU General Public License v3.0
2 stars 4 forks source link

Added `update_view()` function in `utils.py` #336

Closed BPennie03 closed 1 month ago

BPennie03 commented 1 month ago

Description

Added a update_view() function in utils.py to easily update views. It takes in a discord interaction to retrieve the channel and message_id for the current view, as well as a new view object that is used to replace the old view.

Issues

Closes #306

Type of change

Select one or more of the following:

How Has This Been Tested?

Created a Cog.listener explicitly for testing and on the interaction (button click) would change the current view to the new view. Worked like a charm :four_leaf_clover:

Checklist: