Giter VIP home page Giter VIP logo

os-wide-discord-emojis's Introduction

OS-Wide Discord Emojis

This repo contains the tools to download and use Discord emojis anywhere you can paste images with the help of the excellent CopyQ.

Warning

This script uses libraries that enable "self botting", which is explicitly against Discord's ToS. Accounts you use with this script may be banned. It is recommended to create an alternate account and join the servers you'd like to use.

Demo

Pasting to a Teams chat. pasting a discord animated emoji into a teams chat

Features

  • Fast and near universal operation
  • Parallel emoji downloads
  • Animated and static emoji support
  • Normalize emoji size
  • Deduplicated search results

Installation

Prerequisites

  • CopyQ installed
  • Discord self-token. This is the value Authorization the authorization header for /api requests, which you can inspect in your browser or client.
  • Python with necessary libraries:
python -m venv venv
source ./venv/bin/activate # or ./venv/Scripts/activate on windows
pip install -r requirements.txt
  • ffmpeg accessible in your PATH variable if you want to normalize the size of Emojis (recommended. If you don't, emojis will paste in their native size, and will also be listed in their native size, depending on CopyQ settings)

Step 1: Download and normalize emojis

Make sure the DISCORD_TOKEN environment variable is set, optionally through a .env file.

python cli.py dump --normalize 128

Example output:

[2023-08-03 15:02:38] [INFO    ] discord.client: Logging in using static token.
[2023-08-03 15:02:39] [WARNING ] discord.utils: Info API down. Falling back to manual fetching...
[2023-08-03 15:02:40] [INFO    ] discord.http: Found user agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.
[2023-08-03 15:02:40] [INFO    ] discord.gateway: Connected to Gateway (Session ID: <id>).
Successfully auth-ed in as "<user>" with ID <id>
enumerated all 2027 emojis in 0.000s
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2027/2027 
downloaded all 2027 emojis in 0.203s. 2027 existing, 0 downloaded
normalizing emojis
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2027/2027 [00:00<00:00, 10268.77it/s] 
normalized all 2027 emojis in 0.474s. 2027 skipped, 0 processed

For a full list of available options, run cli.py dump --help.

Step 2: Generate a CopyQ command file

Example:

python cli.py generate

Example output:

generating plugin from template
saved command to C:/Users/<user>/universal-discord-emojis/universal-emoji.autogenerated.ini

For a full list of available options, run cli.py generate --help.

Step 3: Import the command into CopyQ

  • Open CopyQ
  • Press F6 to open the command window
  • Click "Load Commands..."
  • Select the file generated in the previous step

Limitations

  • Transparent PNGs do not show correctly in Teams
    • as far as I know this is a Teams issue and there is no way around this.

os-wide-discord-emojis's People

Contributors

mattwmaster58 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

os-wide-discord-emojis's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.