Passed
Push — main ( d518db...6f129f )
by Yohann
01:23
created

chat_commands_function_based.private_say()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
from pincer import command, Client
2
from pincer.objects import Message, InteractionFlags
3
4
5
@Client.event
6
async def on_ready(self):
7
    print(f"Started client on {self.bot}\n"
8
          "Registered commands: " + ", ".join(self.chat_commands))
9
10
11
@command(description="Say something as the bot!")
12
async def say(message: str):
13
    return message
14
15
16
@command(description="Add two numbers!")
17
async def add(first: int, second: int):
18
    return f"The addition of `{first}` and `{second}` is `{first + second}`"
19
20
21
@command(guild=1324567890)
22
async def private_say(message: str):
23
    return Message(message, flags=InteractionFlags.EPHEMERAL)
24
25
26
@command(description="How to make embed!")
27
async def pincer_embed():
28
    return Embed(
29
        title="Pincer - 0.6.4",
30
        description=(
31
            "🚀 An asynchronous python API wrapper meant to replace"
32
            " discord.py\n> Snappy discord api wrapper written "
33
            "with aiohttp & websockets"
34
        )
35
    ).add_field(
36
        name="**Github Repository**",
37
        value="> https://github.com/Pincer-org/Pincer"
38
    ).set_thumbnail(
39
        url="https://pincer.dev/img/icon.png"
40
    ).set_image(
41
        url=(
42
            "https://repository-images.githubusercontent.com"
43
            "/400871418/045ebf39-7c6e-4c3a-b744-0c3122374203"
44
        )
45
    )
46
47
if __name__ == "__main__":
48
    Client("XXXYOURBOTTOKENHEREXXX").run()
49