Skip to content

Commit 6fbeb94

Browse files
author
TheGenocide
committed
Update README
1 parent 05c0838 commit 6fbeb94

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,30 @@ from PyCommands import commands
1212

1313
engine=commands.CommandMaker(prefix="!", name="Timmy", description="Timmy is an engine for making simple commands") #make the CommandMaker instance, Set prefix through prefix kwargs, and set name also description through the kwargs.
1414

15-
@engine.command("hello", description="say hello to someone :)") #Set command name and the description
15+
@engine.command(description="say hello to someone :)") #Set command name and the description
1616
def hello(someone): #support args, as of rigth now PyCommands doesnt support kwargs.
1717
engine.response(f"hello {someone}") #function for printing msg
1818

19-
@engine.command("plus", description="Add numbers")
19+
@engine.command(description="Add numbers")
2020
def plus(a:int, b:int): #make sure to typehinted!
2121
engine.response(a + b) #Will be called with !plus <number> <number>, and it will print the mathematical equation
2222

2323
engine.run() #Run the CommandMaker and make a loop, it will not break unless you use the exit command or rerun the file
2424
```
2525

26+
Run the file, this is how to invoke the command in terminal.
27+
```bash
28+
[100]: PyCommands 0.3.2 (Oct 26, 2021)
29+
. . . Successfully Connected As Timmy.
30+
. . . Typein 'help <command>', for more info! type 'exit' to exit PyCommands style console.
31+
[100]: >>> !hello world
32+
Hello World
33+
[100]: >>> !plus 100 123
34+
223
35+
[100]: >>> exit
36+
[0]: Exit PyCommands Console, status: 0
37+
```
38+
2639
# Links
2740
You can make PR or open an issue in [Github](https://github.com/TheGenocides/PyCommands)
2841

0 commit comments

Comments
 (0)