A Python library for converting Discord emoji names to their Unicode equivalents and vice versa.
- Overview
- Installation
- Quick Start
- Features
- Limitations
- Getting Help
- Development
- Contributing
- License
Dismoji is a lightweight Python library that provides a simple way to convert Discord
emoji names to their Unicode equivalents and vice versa. With just two function calls,
you can transform text containing Discord-style emoji codes (like :smile:
) into text
with actual Unicode emoji characters (like "😄") and back again.
This library uses Paillat-dev/discord-emojis as the source for Discord emoji names and aliases.
pip install dismoji
import dismoji
# Convert Discord emoji names to Unicode emojis
text = "Hello, :wave: I'm excited! :partying_face:"
converted_text = dismoji.emojize(text)
print(converted_text) # Output: "Hello, 👋 I'm excited! 🥳"
# Convert Unicode emojis back to Discord emoji names
emoji_text = "Hello, 👋 I'm excited! 🥳"
named_text = dismoji.demojize(emoji_text)
print(named_text) # Output: "Hello, :wave: I'm excited! :partying_face:"
- Simple API: Just two functions to remember -
dismoji.emojize()
anddismoji.demojize()
- Discord Compatible: Supports Discord's emoji naming conventions
- Comprehensive: Includes all standard emojis available on Discord
- Type Safe: Fully type-annotated for better IDE integration
- Zero Dependencies: Lightweight with no external dependencies
- Fast: Optimized for quick emoji replacement
- Bidirectional: Convert between emoji names and characters in both directions
If you encounter issues or have questions about dismoji:
- GitHub Issues: Submit a bug report or feature request
- Discord Support: Join the Pycord Official Server and
mention
@paillat
- Fork the repository
- Create a feature branch
- Make your changes
- Run linter, formatter and type checker:
ruff check .
,ruff format .
,basedpyright .
- Submit a pull request
Development Tools:
- uv: For dependency management
- Ruff: For linting and formatting
- HashiCorp Copywrite: For managing license headers
- basedpyright: For type checking
emoji
as inspiration for the API design
MIT License - Copyright (c) 2025 Paillat-dev
Made with ❤ by Paillat-dev