Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
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 | if __name__ == "__main__": |
||
27 | Client("XXXYOURBOTTOKENHEREXXX").run() |
||
28 |