-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshout.py
33 lines (31 loc) · 894 Bytes
/
shout.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
import core
PLUGINVERSION = 2
# Always name this variable as `plugin`
# If you dont, module loader will fail to load the plugin!
plugin = core.Plugin()
@plugin.command(command="/shout",
description="Shouts text",
inline_supported=True,
hidden=False,
required_args=1)
def shout(bot, update, user, args):
"""
Example usage:
User: /shout test
Bot:
t e s t
e e
s s
t t
"""
msg = "```"
text = " ".join(args)
result = []
result.append(' '.join([s for s in text]))
for pos, symbol in enumerate(text[1:]):
result.append(symbol + ' ' + ' ' * pos + symbol)
result = list("\n".join(result))
result[0] = text[0]
result = "".join(result)
msg = "```\n" + result + "```"
return core.message(msg, parse_mode="MARKDOWN")