🐛 Fix color_select.py example not changing embed color

This commit is contained in:
2024-08-03 15:59:36 +02:00
parent f1a8c2e31d
commit 191d1d2d9b
7 changed files with 40 additions and 9 deletions

View File

@@ -1,4 +1,3 @@
# ruff: noqa: INP001
import os
import discord
@@ -26,7 +25,7 @@ class Counter(ReactiveView):
self.reset_button = ReactiveButton(
label="Reset",
style=discord.ButtonStyle.danger,
disabled=ReactiveValue(lambda: self.counter == 0, True),
disabled=ReactiveValue(lambda: self.counter == 0, default=True),
)
self.counter_button.callback = self._increment
self.reset_button.callback = self._reset