Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bios-marcel/discordemojimap
Emoji mapping (:​sunglasses: -> 😎) that matches discords mapping
https://github.com/bios-marcel/discordemojimap
discord emoji go golang mapping
Last synced: 1 day ago
JSON representation
Emoji mapping (:​sunglasses: -> 😎) that matches discords mapping
- Host: GitHub
- URL: https://github.com/bios-marcel/discordemojimap
- Owner: Bios-Marcel
- License: bsd-3-clause
- Created: 2019-02-14T19:18:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-03T16:15:45.000Z (9 months ago)
- Last Synced: 2024-10-07T09:12:50.880Z (about 1 month ago)
- Topics: discord, emoji, go, golang, mapping
- Language: Go
- Homepage:
- Size: 122 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord Emoji Map
[![Build status](https://github.com/Bios-Marcel/discordemojimap/actions/workflows/go.yml/badge.svg)](https://github.com/Bios-Marcel/discordemojimap/actions/workflows/go.yml)
[![GoDoc](https://godoc.org/github.com/Bios-Marcel/discordemojimap?status.svg)](https://pkg.go.dev/github.com/Bios-Marcel/discordemojimap/v2)
[![codecov](https://codecov.io/gh/Bios-Marcel/discordemojimap/branch/master/graph/badge.svg)](https://codecov.io/gh/Bios-Marcel/discordemojimap)This library allows you to substitute Discord emoji codes with their respective
emoji.Note that the tests require golang 1.22, due to the fact that they are
parallelised, but don't shadow the loop variables.## Example
```go
package mainimport (
"fmt"
"github.com/Bios-Marcel/discordemojimap"
)func main() {
fmt.Println(discordemojimap.Replace("What a wonderful day :sun_with_face:, am I right?"))
}
```## Update Mapping
To regenerate `mapping.go`, run these commands:
```sh
wget http://discord.com/assets/5c193e4366261ef233e1.js
go run ./cmd/extractmap -path ./5c193e4366261ef233e1.js -out ./mapping.go
```This was last updated on September 10th, 2023.
Note that the name of the asset containing the mapping may change in the future.