Spaces:
Sleeping
Sleeping
TheYoBots commited on
Commit ·
03b8c54
1
Parent(s): 578afc2
Personalised 'name' command
Browse files- conversation.py +3 -2
conversation.py
CHANGED
|
@@ -20,12 +20,13 @@ class Conversation:
|
|
| 20 |
|
| 21 |
def command(self, line, game, cmd):
|
| 22 |
if cmd == "commands" or cmd == "help":
|
| 23 |
-
self.send_reply(line, "Supported commands: !name, !wait, !howto, !
|
| 24 |
elif cmd == "wait" and game.is_abortable():
|
| 25 |
game.ping(60, 120)
|
| 26 |
self.send_reply(line, "Waiting 60 seconds...")
|
| 27 |
elif cmd == "name":
|
| 28 |
-
|
|
|
|
| 29 |
elif cmd == "howto":
|
| 30 |
self.send_reply(line, "How to run your own bot: https://github.com/TheYoBots/Lishogi-Bot")
|
| 31 |
elif cmd == "eval" and line.room == "spectator":
|
|
|
|
| 20 |
|
| 21 |
def command(self, line, game, cmd):
|
| 22 |
if cmd == "commands" or cmd == "help":
|
| 23 |
+
self.send_reply(line, "Supported commands: !name, !wait (only applicable at the start of the game), !howto, !queue")
|
| 24 |
elif cmd == "wait" and game.is_abortable():
|
| 25 |
game.ping(60, 120)
|
| 26 |
self.send_reply(line, "Waiting 60 seconds...")
|
| 27 |
elif cmd == "name":
|
| 28 |
+
name = game.me.name
|
| 29 |
+
self.send_reply(line, "{} lishogi-bot v1.0.0".format.(name))
|
| 30 |
elif cmd == "howto":
|
| 31 |
self.send_reply(line, "How to run your own bot: https://github.com/TheYoBots/Lishogi-Bot")
|
| 32 |
elif cmd == "eval" and line.room == "spectator":
|