Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from pincer import Client, command |
||
2 | from pincer.objects import Embed |
||
3 | |||
4 | |||
5 | class Bot(Client): |
||
6 | |||
7 | @command(description="Say something as the bot!") |
||
8 | async def say(self, ctx, content: str) -> Embed: |
||
9 | # Using the ctx to get the command author |
||
10 | return Embed( |
||
11 | description=f"{ctx.author.user.mention} said {content}" |
||
12 | ) |
||
13 | |||
14 | @Client.event |
||
15 | async def on_ready(self): |
||
16 | # Our client has successfully started, lets let ourself know that! |
||
17 | print("Logged in as", self.bot) |
||
18 | |||
19 | |||
20 | if __name__ == "__main__": |
||
21 | Bot("XXXYOURBOTTOKENHEREXXX").run() |
||
22 |