File size: 1,016 Bytes
561cd5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from ubot import *

__MODULE__ = "Notes"
__HELP__ = """Help For Notes

• Command: <code>{0}save</code> [name - reply message]
• Explanation: To save a note.

• Command: <code>{0}get</code> [name]
• Explanation: To retrieve a saved note.

• Command: <code>{0}rm</code> [name]
• Explanation: To delete a note name.

• Command: <code>{0}notes</code>
• Explanation: To see a list of saved notes.

• Note: To use the button, use the format:
<code>Mbah google [google|google.com]</code>
"""


@PY.UBOT("save", sudo=True)
async def _(client, message):
    await addnote_cmd(client, message)


@PY.UBOT("get", sudo=True)
async def _(client, message):
    await get_cmd(client, message)


@PY.INLINE("^get_notes")
@INLINE.QUERY
async def _(client, inline_query):
    await get_notes_button(client, inline_query)


@PY.UBOT("rm", sudo=True)
async def _(client, message):
    await delnote_cmd(client, message)


@PY.UBOT("notes", sudo=True)
async def _(client, message):
    await notes_cmd(client, message)