forked from sass/tipibot
Refacor emoijs to use application emoijs
This commit is contained in:
@@ -10,6 +10,7 @@ import discord
|
||||
from discord import app_commands
|
||||
|
||||
from core import economy
|
||||
from core.emoji import EMOJI as E
|
||||
import strings as S
|
||||
|
||||
|
||||
@@ -288,12 +289,12 @@ def register_economy_extra_commands(
|
||||
# /jailbreak - Monopoly-style dice escape
|
||||
# -----------------------------------------------------------------------
|
||||
_DICE_EMOJI = [
|
||||
"<:TipiYKS:1483103190491856916>",
|
||||
"<:TipiKAKS:1483103215841972404>",
|
||||
"<:TipiKOLM:1483103217846980781>",
|
||||
"<:TipiNELI:1483103237585240114>",
|
||||
"<:TipiVIIS:1483103239036469289>",
|
||||
"<:TipiKUUS:1483103253163020348>",
|
||||
E["TipiYKS"],
|
||||
E["TipiKAKS"],
|
||||
E["TipiKOLM"],
|
||||
E["TipiNELI"],
|
||||
E["TipiVIIS"],
|
||||
E["TipiKUUS"],
|
||||
]
|
||||
|
||||
class JailbreakView(discord.ui.View):
|
||||
@@ -813,7 +814,6 @@ def register_economy_extra_commands(
|
||||
btn = discord.ui.Button(
|
||||
label=label,
|
||||
style=discord.ButtonStyle.primary if t == self._tier else discord.ButtonStyle.secondary,
|
||||
custom_id=f"shop_tier_{t}",
|
||||
)
|
||||
btn.callback = self._make_callback(t)
|
||||
self.add_item(btn)
|
||||
@@ -822,8 +822,9 @@ def register_economy_extra_commands(
|
||||
async def callback(interaction: discord.Interaction):
|
||||
self._tier = tier
|
||||
self._update_buttons()
|
||||
await interaction.response.defer()
|
||||
self._user_data = await economy.get_user(interaction.user.id)
|
||||
await interaction.response.edit_message(
|
||||
await interaction.edit_original_response(
|
||||
embed=_shop_embed(self._tier, self._user_data),
|
||||
view=self,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user