File size: 7,736 Bytes
80287e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
from pyrogram import filters
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
from Devine.utils.fonts import Fonts
from Devine import app
@app.on_message(filters.command(["font", "fonts"]))
async def style_buttons(c, m, cb=False):
text = m.text.split(' ',1)[1]
buttons = [
[
InlineKeyboardButton("๐ฆ๐ฎ๐ป๐", callback_data="style+sans"),
InlineKeyboardButton("๐๐๐ฃ๐จ", callback_data="style+slant_sans"),
InlineKeyboardButton("๐ฒ๐บ๐๐", callback_data="style+sim"),
],
[
InlineKeyboardButton("๐๐ข๐ฏ๐ด", callback_data="style+slant"),
InlineKeyboardButton("๐๐๐ซ๐ข๐", callback_data="style+serif"),
InlineKeyboardButton("๐บ๐๐๐๐", callback_data="style+bold_cool"),
],
[
InlineKeyboardButton("๐๐๐๐๐", callback_data="style+cool"),
InlineKeyboardButton("๐๐ธ๐๐พ๐
๐", callback_data="style+script"),
InlineKeyboardButton("๐ผ๐ฌ๐ป๐ฒ๐น๐ฝ", callback_data="style+script_bolt"),
],
[
InlineKeyboardButton("Sแดแดสส Cแดแดs", callback_data="style+small_cap"),
InlineKeyboardButton("๐
๏ธ๐
๏ธ๐
ก๏ธ๐
๏ธ๐
๏ธ๐
๏ธ๐
ข๏ธ", callback_data="style+circle_dark"),
InlineKeyboardButton("โธ๏ธโพ๏ธโ๏ธโธ๏ธโ๏ธโบ๏ธโ๏ธ", callback_data="style+circles"),
],
[
InlineKeyboardButton("๐ฒ๐๐๐๐๐", callback_data="style+gothic_bolt"),
InlineKeyboardButton("๐๐ฌ๐ฑ๐ฅ๐ฆ๐ ", callback_data="style+gothic"),
InlineKeyboardButton("แตโฑโฟสธ", callback_data="style+tiny"),
],
[
InlineKeyboardButton("๐๐ข๐๐๐ ๐๐๐๐๐", callback_data="style+typewriter"),
InlineKeyboardButton("๐๐ฆ๐ฅ๐๐๐๐", callback_data="style+outline"),
InlineKeyboardButton("แOแฐIแ", callback_data="style+comic"),
],
[
InlineKeyboardButton("Cอกอlอกอoอกอuอกอdอกอsอกอ", callback_data="style+cloud"),
InlineKeyboardButton("Hฬฬaฬฬpฬฬpฬฬyฬฬ", callback_data="style+happy"),
InlineKeyboardButton("Sฬฬaฬฬdฬฬ", callback_data="style+sad"),
],
[
InlineKeyboardButton ("แดสแดsแด",callback_data="close_reply"),InlineKeyboardButton ("ษดแดxแด", callback_data="nxt")],
]
if not cb:
await m.reply_text(
f"{text}", reply_markup=InlineKeyboardMarkup(buttons), quote=True
)
else:
await m.answer()
await m.message.edit_reply_markup(InlineKeyboardMarkup(buttons))
@app.on_callback_query(filters.regex("^nxt"))
async def nxt(c, m):
if m.data == "nxt":
buttons = [
[
InlineKeyboardButton("๐ธโ๐ตโ๐ชโ๐จโ๐ฎโ๐ฆโ๐ฑโ", callback_data="style+special"),
InlineKeyboardButton("๐
๐
๐
๐ฐ๐
๐ด๐
", callback_data="style+squares"),
InlineKeyboardButton(
"๐๏ธ๐๏ธ๐๏ธ๐
ฐ๏ธ๐๏ธ๐
ด๏ธ๐๏ธ", callback_data="style+squares_bold"
),
],
[
InlineKeyboardButton("๊ช๊ชแฆ๊ช๊ชถ๊ชแฅด๐ฒ๊ช", callback_data="style+andalucia"),
InlineKeyboardButton("็ชๅๅ แๅ", callback_data="style+manga"),
InlineKeyboardButton("Sฬพtฬพiฬพnฬพkฬพyฬพ", callback_data="style+stinky"),
],
[
InlineKeyboardButton(
"Bอฆฬฅuอฆฬฅbอฆฬฅbอฆฬฅlอฆฬฅeอฆฬฅsอฆฬฅ", callback_data="style+bubbles"
),
InlineKeyboardButton(
"Uอnอdอeอrอlอiอnอeอ", callback_data="style+underline"
),
InlineKeyboardButton("๊๊๊ท๊ฉ๊๊๊
", callback_data="style+ladybug"),
],
[
InlineKeyboardButton("Rาaาyาsา", callback_data="style+rays"),
InlineKeyboardButton("Bาiาrาdาsา", callback_data="style+birds"),
InlineKeyboardButton("Sฬธlฬธaฬธsฬธhฬธ", callback_data="style+slash"),
],
[
InlineKeyboardButton("sโ tโ oโ pโ ", callback_data="style+stop"),
InlineKeyboardButton(
"Sอฬบkอฬบyอฬบlอฬบiอฬบnอฬบeอฬบ", callback_data="style+skyline"
),
InlineKeyboardButton("Aอrอrอoอwอsอ", callback_data="style+arrows"),
],
[
InlineKeyboardButton("แชแแญแฟแ", callback_data="style+qvnes"),
InlineKeyboardButton("Sฬถtฬถrฬถiฬถkฬถeฬถ", callback_data="style+strike"),
InlineKeyboardButton("Fเผrเผoเผzเผeเผnเผ", callback_data="style+frozen"),
],
[
InlineKeyboardButton ("แดสแดsแด",callback_data="close_reply"),InlineKeyboardButton ("สแดแดแด", callback_data="nxt+0")],
]
await m.answer()
await m.message.edit_reply_markup(InlineKeyboardMarkup(buttons))
else:
await style_buttons(c, m, cb=True)
@app.on_callback_query(filters.regex("^style"))
async def style(c, m):
await m.answer()
cmd,style = m.data.split('+')
if style == "typewriter":
cls = Fonts.typewriter
if style == "outline":
cls = Fonts.outline
if style == "serif":
cls = Fonts.serief
if style == "bold_cool":
cls = Fonts.bold_cool
if style == "cool":
cls = Fonts.cool
if style == "small_cap":
cls = Fonts.smallcap
if style == "script":
cls = Fonts.script
if style == "script_bolt":
cls = Fonts.bold_script
if style == "tiny":
cls = Fonts.tiny
if style == "comic":
cls = Fonts.comic
if style == "sans":
cls = Fonts.san
if style == "slant_sans":
cls = Fonts.slant_san
if style == "slant":
cls = Fonts.slant
if style == "sim":
cls = Fonts.sim
if style == "circles":
cls = Fonts.circles
if style == "circle_dark":
cls = Fonts.dark_circle
if style == "gothic":
cls = Fonts.gothic
if style == "gothic_bolt":
cls = Fonts.bold_gothic
if style == "cloud":
cls = Fonts.cloud
if style == "happy":
cls = Fonts.happy
if style == "sad":
cls = Fonts.sad
if style == "special":
cls = Fonts.special
if style == "squares":
cls = Fonts.square
if style == "squares_bold":
cls = Fonts.dark_square
if style == "andalucia":
cls = Fonts.andalucia
if style == "manga":
cls = Fonts.manga
if style == "stinky":
cls = Fonts.stinky
if style == "bubbles":
cls = Fonts.bubbles
if style == "underline":
cls = Fonts.underline
if style == "ladybug":
cls = Fonts.ladybug
if style == "rays":
cls = Fonts.rays
if style == "birds":
cls = Fonts.birds
if style == "slash":
cls = Fonts.slash
if style == "stop":
cls = Fonts.stop
if style == "skyline":
cls = Fonts.skyline
if style == "arrows":
cls = Fonts.arrows
if style == "qvnes":
cls = Fonts.rvnes
if style == "strike":
cls = Fonts.strike
if style == "frozen":
cls = Fonts.frozen
#text = m.text.split(' ',1)[1]
new_text = cls(m.message.reply_to_message.text.split(" ",1)[1])
try:
await m.message.edit_text(new_text, reply_markup=m.message.reply_markup)
except:
pass
|