✨ converted hangman to buttons
This commit is contained in:
@ -11,6 +11,8 @@ from discord_slash.utils.manage_components import (create_button,
|
||||
create_actionrow)
|
||||
from discord_slash.model import ButtonStyle
|
||||
|
||||
from gwendolyn.utils import encode_id
|
||||
|
||||
class Plex():
|
||||
"""Container for Plex functions and commands."""
|
||||
def __init__(self,bot):
|
||||
@ -73,7 +75,7 @@ class Plex():
|
||||
buttons.append(create_button(
|
||||
style=ButtonStyle.green,
|
||||
label="✓",
|
||||
custom_id=f"plex:movie:{imdb_ids[0]}"
|
||||
custom_id=encode_id(["plex", "movie", str(imdb_ids[0])])
|
||||
)
|
||||
)
|
||||
else:
|
||||
@ -82,14 +84,14 @@ class Plex():
|
||||
create_button(
|
||||
style=ButtonStyle.blue,
|
||||
label=str(i+1),
|
||||
custom_id=f"plex:movie:{imdb_ids[i]}"
|
||||
custom_id=encode_id(["plex", "movie", str(imdb_ids[i])])
|
||||
)
|
||||
)
|
||||
|
||||
buttons.append(create_button(
|
||||
style=ButtonStyle.red,
|
||||
label="X",
|
||||
custom_id="plex:movie:"
|
||||
custom_id=encode_id(["plex", "movie", ""])
|
||||
)
|
||||
)
|
||||
|
||||
@ -211,7 +213,7 @@ class Plex():
|
||||
buttons.append(create_button(
|
||||
style=ButtonStyle.green,
|
||||
label="✓",
|
||||
custom_id=f"plex:show:{imdb_ids[0]}"
|
||||
custom_id=encode_id(["plex", "show", str(imdb_ids[0])])
|
||||
)
|
||||
)
|
||||
else:
|
||||
@ -220,14 +222,14 @@ class Plex():
|
||||
create_button(
|
||||
style=ButtonStyle.blue,
|
||||
label=str(i+1),
|
||||
custom_id=f"plex:show:{imdb_ids[i]}"
|
||||
custom_id=encode_id(["plex", "show", str(imdb_ids[i])])
|
||||
)
|
||||
)
|
||||
|
||||
buttons.append(create_button(
|
||||
style=ButtonStyle.red,
|
||||
label="X",
|
||||
custom_id="plex:show:"
|
||||
custom_id=encode_id(["plex", "show", ""])
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user