~nova/fletcher

ref: c1acd163f33f54a9b253f908f8387cb0c0a07fa7 fletcher/utils/emojisavailable.py -rw-r--r-- 678 bytes
c1acd163 — Novalinium muple 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import configparser
import json
import discord
import os
import sys

FLETCHER_CONFIG = os.getenv('FLETCHER_CONFIG', './.fletcherrc')

config = configparser.ConfigParser()
config.read(FLETCHER_CONFIG)

intents = discord.Intents.default()
intents.members = True
client = discord.Client(intents=intents, chunk_guilds_at_startup=False)

# token from https://discordapp.com/developers
token = config['discord']['botToken']

@client.event
async def on_ready():
    print("<ul>"+"".join([f"<li><img src='{emoji.url_as()}' height='2em' width='2em' loading='lazy' />{emoji.name}</li>" for emoji in client.emojis if emoji.is_usable()])+"</ul>")
    await client.close()
client.run(token)