Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from pincer.client import Client |
||
2 | from pincer.commands import command |
||
3 | |||
4 | |||
5 | class Bot(Client): |
||
6 | @Client.event |
||
7 | async def on_ready(self): |
||
8 | print(f"Started client on {self.bot}\n" |
||
9 | "Registered commands: " + ", ".join(self.chat_commands)) |
||
10 | |||
11 | @command(description="Say something as the bot!") |
||
12 | async def say(self, message: str): |
||
13 | return message |
||
14 | |||
15 | @command(description="Add two numbers!") |
||
16 | async def add(self, first: int, second: int): |
||
17 | return f"The addition of `{first}` and `{second}` is `{first + second}`" |
||
18 | |||
19 | |||
20 | if __name__ == "__main__": |
||
21 | Bot("XXXYOURBOTTOKENHEREXXX").run() |
||
22 |