Skip to content

Commit f3abfa3

Browse files
authored
Update dsmsg command (#97)
* "Implement" "support" for DsMsg Sekiro messages Simply passes any options on to the binary, which must already be a version that supports it. * "Implement" "support" for DsMsg Elden Ring messages Simply passes any options on to the binary, which must already be a version that supports it. * Finish alphabetizing option check
1 parent a7a2693 commit f3abfa3

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

petal/commands/public.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -881,25 +881,31 @@ async def cmd_userinfo(self, args, src: Src, **_):
881881

882882
async def cmd_dsmsg(
883883
self,
884+
# NOTE: Change to `_bb1` upon announcement of Bloodborne II.
885+
_bb: bool = False,
884886
_ds1: bool = False,
885887
_ds2: bool = False,
886888
_ds3: bool = False,
887889
_des: bool = False,
888-
_bb: bool = False,
890+
# NOTE: Change to `_er1` upon announcement of Elden Ring II.
891+
_er: bool = False,
892+
_sek: bool = False,
889893
**_,
890894
):
891-
"""Randomly generate a message that you might find in the Dark Souls
892-
series.
895+
"""Randomly generate a message that you might find in games by
896+
FromSoftware.
893897
894-
The message may be in the format used by any of the three games. Also
895-
requires that a path to an executable is set in the bot config.
898+
The message may be in the format used by any of the games. Also requires
899+
that a path to an executable is set in the bot config.
896900
897901
Options:
898-
`--bb` :: Generate messages from Bloodborne.
902+
`--bb` :: Generate messages from Bloodborne.
899903
`--des` :: Generate messages from Demon's Souls.
900904
`--ds1` :: Generate messages from Dark Souls I.
901905
`--ds2` :: Generate messages from Dark Souls II.
902906
`--ds3` :: Generate messages from Dark Souls III.
907+
`--er` :: Generate messages from Elden Ring.
908+
`--sek` :: Generate messages from Sekiro.
903909
"""
904910
binary = self.config.get("dsmsg_executable")
905911
if not binary:
@@ -909,16 +915,20 @@ async def cmd_dsmsg(
909915

910916
dsmsg = [binary]
911917

918+
if _bb:
919+
dsmsg.append("--bb")
920+
if _des:
921+
dsmsg.append("--des")
912922
if _ds1:
913923
dsmsg.append("--ds1")
914924
if _ds2:
915925
dsmsg.append("--ds2")
916926
if _ds3:
917927
dsmsg.append("--ds3")
918-
if _des:
919-
dsmsg.append("--des")
920-
if _bb:
921-
dsmsg.append("--bb")
928+
if _er:
929+
dsmsg.append("--er1")
930+
if _sek:
931+
dsmsg.append("--sek")
922932

923933
print(repr(dsmsg))
924934

0 commit comments

Comments
 (0)