-
Notifications
You must be signed in to change notification settings - Fork 1
/
rekt.py
50 lines (42 loc) · 1.85 KB
/
rekt.py
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
# -*- coding: future_fstrings -*-
# Friendly Telegram (telegram userbot)
# Copyright (C) 2018-2020 The Authors
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import random
import logging
from asyncio import sleep
from .. import loader, utils
logger = logging.getLogger(__name__)
def register(cb):
cb(RektMod())
REKTS = ["Not rekt", "Rekt", "Really Rekt", "Tyrannosaurus Rekt", "Parks and Rekt",
"Star Trekt", "School Of Rekt", "Catcher in the Rekt", "Great Rektspectations",
"Rekt It Ralph", "www.rekkit.com", "The Shawshank Rektemption", "Forrekt Gump",
"Finding Rekt", "Shrekt", "Rektal Exam", "Rektium for a Dream", "Erektile Dysfunction"]
UNTICK = "☐ "
TICK = "☑ "
class RektMod(loader.Module):
"""RektMod meme module"""
strings = {"name": "Rekt"}
def __init__(self):
self.config = loader.ModuleConfig("REKTS", REKTS, "Random rekts messages")
async def rektcmd(self, message):
""".rekt sends rekts"""
msg = ""
for x in REKTS:
await sleep(0.4)
if "Not rekt" in x:
msg += UNTICK
else:
msg += TICK
msg += x + "\n"
await message.edit(msg)