#now get emoji_id?

1 messages · Page 1 of 1 (latest)

blissful wind
little cradleBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

dark jolt
#

is emoji_id supposed to be a slash command argument?

blissful wind
# dark jolt is `emoji_id` supposed to be a slash command argument?

Traceback (most recent call last):
File "/var/data/python/lib/python3.11/site-packages/interactions/client/client.py", line 2018, in __dispatch_interaction
response = await callback
^^^^^^^^^^^^^^
File "/var/data/python/lib/python3.11/site-packages/interactions/client/client.py", line 1886, in _run_slash_command
return await command(ctx, **ctx.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/data/python/lib/python3.11/site-packages/interactions/models/internal/command.py", line 132, in call
await self.call_callback(self.callback, context)
File "/var/data/python/lib/python3.11/site-packages/interactions/models/internal/application_commands.py", line 872, in call_callback
return await self.call_with_binding(callback, ctx, *new_args, **new_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/data/python/lib/python3.11/site-packages/interactions/models/internal/callback.py", line 44, in call_with_binding
return await callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/portable/Загрузки/srv/Yamori/cogs/economy.py", line 153, in balance
emoji = self.bot.get(Emoji, emoji_id=emoji_money_id)
^^^^^^^^^^^^
AttributeError: 'Client' object has no attribute 'get'

dark jolt
#

there's no such thing as OptionType.EMOJI however, so the next best way is to receive the input as a string and convert that using await PartialEmojiConverter().convert() or await CustomEmojiConverter().convert(), then use its output, your emoji object
(unless there's something i'm missing here)