Skip to content

Instantly share code, notes, and snippets.

View AdhTri001's full-sized avatar
💭
Boo!

Adheesh Trivedi AdhTri001

💭
Boo!
  • Bhopal
View GitHub Profile
@AdhTri001
AdhTri001 / Mimic.py
Created July 24, 2021 09:14
This command is for `discord.py` bot that creates a fake discord message snap and sends to the channel
import discord
from discord.ext import commands
from PIL import Image, ImageFont, ImageDraw
from pilmoji import Pilmoji
CHANNEL_regex= re.compile('<#(\d{16,22})>')
ROLE_regex= re.compile('(<@&\d{16,22}>)')
MENTION_regex= re.compile('<@(?:!)?(\d{16,22})>')
ITALICS_regex= re.compile('((?:_[^_]+?_(?!\w)|$)|(?:\*[^\*]+?\*(?=(?:\*\*)+|[^\*]+|$)))')
BOLD_regex= re.compile('(\*\*.+?\*{2,})')