@@ -65,7 +65,7 @@ async def format_page(self, menu: views.Paginator, page: List[InventoryItem]) ->
65
65
if item .durability is not None :
66
66
stats += f"Durability: { inv_item .durability } /{ item .durability } "
67
67
68
- embed .add_field (name = f"{ item .emoji } { item . display_name } " , value = stats , inline = True )
68
+ embed .add_field (name = f"{ item .name ( bold = False ) } " , value = stats , inline = True )
69
69
70
70
return embed
71
71
@@ -90,7 +90,7 @@ async def _use_item(self, inventory_item: InventoryItem, quantity: int, player:
90
90
hp_gained = 8
91
91
92
92
await player .add_hp (hp_gained )
93
- return f"{ cosmetics .EMOJI_HEALTH_HALF } Ate { quantity } ** { data .emoji } { data . display_name } ** to restore `{ hp_gained } ` HP."
93
+ return f"{ cosmetics .EMOJI_HEALTH_HALF } Ate { quantity } { data .name () } to restore `{ hp_gained } ` HP."
94
94
else :
95
95
return False
96
96
@@ -124,7 +124,7 @@ async def info(self, interaction: discord.Interaction, item: str):
124
124
125
125
data = self .bot .items [item ]
126
126
embed = discord .Embed (
127
- title = f" { data .emoji } { data . display_name } " ,
127
+ title = data .name ( bold = False ) ,
128
128
description = data .description ,
129
129
color = discord .Color .dark_embed (),
130
130
)
@@ -144,7 +144,7 @@ async def info(self, interaction: discord.Interaction, item: str):
144
144
embed .add_field (
145
145
name = "Crafting Recipe" ,
146
146
value = f"\n " .join (
147
- f"{ amount } x { self .bot .items [reqitem ].emoji } { self . bot . items [ reqitem ]. display_name } "
147
+ f"{ amount } x { self .bot .items [reqitem ].name ( bold = False ) } "
148
148
for reqitem , amount in data .crafting_recipe .items ()
149
149
),
150
150
inline = False ,
@@ -158,15 +158,15 @@ async def info(self, interaction: discord.Interaction, item: str):
158
158
reqitem = self .bot .items [data .smelting_recipe ]
159
159
embed .add_field (
160
160
name = "Smelting Recipe" ,
161
- value = f" { reqitem .emoji } { reqitem . display_name } " ,
161
+ value = reqitem .name ( bold = False ) ,
162
162
inline = False ,
163
163
)
164
164
165
165
if data .smelting_product is not None :
166
166
reqitem = self .bot .items [data .smelting_product ]
167
167
embed .add_field (
168
168
name = "Smelting Product" ,
169
- value = f" { reqitem .emoji } { reqitem . display_name } " ,
169
+ value = reqitem .name ( bold = False ) ,
170
170
inline = False ,
171
171
)
172
172
@@ -210,12 +210,12 @@ async def discard(self, interaction: discord.Interaction, item: str, quantity: s
210
210
amount = int (quantity )
211
211
212
212
if amount > data .quantity :
213
- raise checks .GenericError (f"You don't have this much quantity. You only have `{ data .quantity } ` ** { item_data .emoji } { item_data . display_name } ** ." )
213
+ raise checks .GenericError (f"You don't have this much quantity. You only have `{ data .quantity } ` { item_data .name () } ." )
214
214
215
215
confirmation = views .Confirmation (user = interaction .user , timeout = 30 )
216
216
embed = discord .Embed (
217
217
title = f"{ cosmetics .EMOJI_DANGER } Are you sure?" ,
218
- description = f"You are about to discard `{ amount } ` ** { item_data .emoji } { item_data . display_name } ** . After discarding, the item will be lost." ,
218
+ description = f"You are about to discard `{ amount } ` { item_data .name () } . After discarding, the item will be lost." ,
219
219
color = discord .Color .dark_embed (),
220
220
)
221
221
@@ -226,7 +226,7 @@ async def discard(self, interaction: discord.Interaction, item: str, quantity: s
226
226
227
227
if confirmation .confirmed :
228
228
await data .remove (amount )
229
- message = f"Discarded `{ amount } ` ** { item_data .emoji } { item_data . display_name } ** "
229
+ message = f"Discarded `{ amount } ` { item_data .name () } "
230
230
else :
231
231
message = f"Action canceled. No changes were made."
232
232
@@ -267,13 +267,11 @@ async def craft(self, interaction: discord.Interaction, item: str, quantity: int
267
267
268
268
error_message = ""
269
269
if required_item is None :
270
- error_message = f"{ cosmetics .EMOJI_WARNING } You need `{ crafting_quantity } ` **{ required_item_data .emoji } " \
271
- f"{ required_item_data .display_name } **. You have none."
270
+ error_message = f"{ cosmetics .EMOJI_WARNING } You need `{ crafting_quantity } ` { required_item_data .name ()} . You have none."
272
271
else :
273
272
required_quantity = crafting_quantity * quantity
274
273
if required_quantity > required_item .quantity :
275
- error_message = f"{ cosmetics .EMOJI_WARNING } You need `{ required_quantity } ` { required_item_data .emoji } " \
276
- f"{ required_item_data .display_name } . You currently have `{ required_item .quantity } ` of it."
274
+ error_message = f"{ cosmetics .EMOJI_WARNING } You need `{ required_quantity } ` { required_item_data .name ()} . You currently have `{ required_item .quantity } ` of it."
277
275
else :
278
276
await required_item .remove (required_quantity )
279
277
@@ -284,7 +282,7 @@ async def craft(self, interaction: discord.Interaction, item: str, quantity: int
284
282
# craft the given item so add it to inventory.
285
283
quantity_crafted = quantity * item_data .crafting_quantity
286
284
await InventoryItem .add (player = profile , item_id = item , quantity = quantity_crafted , durability = item_data .durability )
287
- await interaction .edit_original_response (content = f":carpentry_saw: Crafted `{ quantity_crafted } ` ** { item_data .emoji } { item_data . display_name } ** " , embed = None )
285
+ await interaction .edit_original_response (content = f":carpentry_saw: Crafted `{ quantity_crafted } ` { item_data .name () } " , embed = None )
288
286
289
287
@app_commands .command ()
290
288
@checks .has_survival_profile ()
@@ -320,7 +318,7 @@ async def smelt(self, interaction: discord.Interaction, item: str, quantity: int
320
318
)
321
319
if inv_item .quantity < quantity :
322
320
return await interaction .edit_original_response (
323
- content = f"{ cosmetics .EMOJI_WARNING } You only have `{ inv_item .quantity } ` ** { data .emoji } { data . display_name } ** ." ,
321
+ content = f"{ cosmetics .EMOJI_WARNING } You only have `{ inv_item .quantity } ` { data .name () } ." ,
324
322
embed = None ,
325
323
)
326
324
@@ -330,14 +328,14 @@ async def smelt(self, interaction: discord.Interaction, item: str, quantity: int
330
328
331
329
if coal is None :
332
330
return await interaction .edit_original_response (
333
- content = f"{ cosmetics .EMOJI_WARNING } You need ** { coal_data . emoji } { coal_data . display_name } ** to smelt items." ,
331
+ content = f"{ cosmetics .EMOJI_WARNING } You need { data . name () } to smelt items." ,
334
332
embed = None ,
335
333
)
336
334
337
335
required_fuel = math .ceil (quantity / 4 )
338
336
if coal .quantity < required_fuel :
339
- message = f"{ cosmetics .EMOJI_WARNING } You need `{ required_fuel } ` ** { coal_data .emoji } { coal_data . display_name } ** " \
340
- f"to smelt `{ quantity } ` ** { data .emoji } { data . display_name } ** . You only have `{ coal .quantity } ` of coal."
337
+ message = f"{ cosmetics .EMOJI_WARNING } You need `{ required_fuel } ` { coal_data .name () } " \
338
+ f"to smelt `{ quantity } ` { data .name () } . You only have `{ coal .quantity } ` of coal."
341
339
342
340
return await interaction .edit_original_response (
343
341
content = message ,
@@ -351,11 +349,11 @@ async def smelt(self, interaction: discord.Interaction, item: str, quantity: int
351
349
xp_gained = random .randint (1 , 5 )
352
350
embed = discord .Embed (
353
351
title = ":wood: Smelting" ,
354
- description = f"Successfully smelted `{ quantity } ` ** { data .emoji } { data . display_name } ** " ,
352
+ description = f"Successfully smelted `{ quantity } ` { data .name () } " ,
355
353
color = discord .Color .dark_embed (),
356
354
)
357
- embed .add_field (name = "Product" , value = f"{ quantity } x ** { item_formed .emoji } { item_formed . display_name } ** " )
358
- embed .add_field (name = "Fuel Used" , value = f"{ required_fuel } x ** { coal_data .emoji } { coal_data . display_name } ** " )
355
+ embed .add_field (name = "Product" , value = f"{ quantity } x { item_formed .name () } " )
356
+ embed .add_field (name = "Fuel Used" , value = f"{ required_fuel } x { coal_data .name () } " )
359
357
embed .set_footer (text = f"+{ xp_gained } XP" )
360
358
361
359
await interaction .edit_original_response (embed = embed )
0 commit comments