Skip to content

Commit bf546f9

Browse files
committed
Final cleanup of attacks.py and attack data
1 parent 767bbac commit bf546f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

data/attacks/compliment.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"target_templates": [
3-
"{user} {phrase}."
3+
"{user}, {phrase}."
44
],
55
"parts": {
66
"phrase": [

plugins/attacks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, name, doc, *commands, action=None, file=None, response=RespTy
5858
require_target=False
5959
),
6060
BasicAttack("insult", "<user> - insults <user>", response=RespType.MESSAGE),
61-
BasicAttack("present", "<user> - gives gift to <user>", action="give a gift to"),
61+
BasicAttack("present", "<user> - gives gift to <user>", "present", "gift", action="give a gift to"),
6262
)
6363

6464

@@ -92,7 +92,7 @@ def basic_format(text, data, **kwargs):
9292
templates = data["templates"]
9393

9494
generator = textgen.TextGenerator(
95-
templates, data["parts"], variables=kwargs
95+
templates, data.get("parts", {}), variables=kwargs
9696
)
9797

9898
return generator.generate_string()

0 commit comments

Comments
 (0)