dico.utils module
- async dico.utils.safe_call(coro, additional_message=None)
Calls coroutine, ignoring raised exception and only print traceback. This is used for event listener call, and intended to be used at creating task.
- Parameters:
coro – Coroutine to safely call
additional_message – Additional traceback message to print at the top.
- dico.utils.cdn_url(route, *, image_hash, extension='webp', size=1024, **snowflake_ids)
- dico.utils.ensure_coro(func)
- dico.utils.format_discord_error(resp)
- dico.utils.from_emoji(emoji)
- async dico.utils.wrap_to_async(cls, client, resp, as_create=True, **kwargs)
- dico.utils.to_image_data(image)
- dico.utils.rgb(red, green, blue)
- dico.utils.get_shard_id(guild_id, num_shards)