mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
publish: 5.5.1
This commit is contained in:
parent
1aeb245c6d
commit
5d23dc7229
7 changed files with 13 additions and 11 deletions
8
poetry.lock
generated
8
poetry.lock
generated
|
@ -586,7 +586,7 @@ description = "A multipurpose bot and web framework"
|
||||||
name = "royalnet"
|
name = "royalnet"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.8,<4.0"
|
python-versions = ">=3.8,<4.0"
|
||||||
version = "5.5a5"
|
version = "5.5"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
dateparser = ">=0.7.2,<0.8.0"
|
dateparser = ">=0.7.2,<0.8.0"
|
||||||
|
@ -867,7 +867,7 @@ python-versions = "*"
|
||||||
version = "2020.1.24"
|
version = "2020.1.24"
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
content-hash = "03b83f374f0113316752e6df25d265ec5d45a2f932f73de1422c92ba06621f66"
|
content-hash = "df4780c4db22554a780094003cbfc212af50118fc8b404c9ca25a9c61613ddb5"
|
||||||
python-versions = "^3.8"
|
python-versions = "^3.8"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
|
@ -1307,8 +1307,8 @@ riotwatcher = [
|
||||||
{file = "riotwatcher-2.7.1.tar.gz", hash = "sha256:5349271c7e00637b7619491a6070e66603705db60558ea2a690e7016f6e6d9a4"},
|
{file = "riotwatcher-2.7.1.tar.gz", hash = "sha256:5349271c7e00637b7619491a6070e66603705db60558ea2a690e7016f6e6d9a4"},
|
||||||
]
|
]
|
||||||
royalnet = [
|
royalnet = [
|
||||||
{file = "royalnet-5.5a5-py3-none-any.whl", hash = "sha256:f913ec05849c56885bc2a455c6589d960e5af124aacc703bbd3a0e1f004d26b8"},
|
{file = "royalnet-5.5-py3-none-any.whl", hash = "sha256:1df345584d42ea43942606c57e24f8ffc96d0b5ef28296f78707d68dc2d21448"},
|
||||||
{file = "royalnet-5.5a5.tar.gz", hash = "sha256:cbb22f322f6bc8ec0a6404a14d3faf046ad3fb74971917e4f87c16bb2aa300f7"},
|
{file = "royalnet-5.5.tar.gz", hash = "sha256:e076355fdf7d8730d258a055c22055ee8f309316a9efb3706da6896e0dc36e39"},
|
||||||
]
|
]
|
||||||
royalspells = [
|
royalspells = [
|
||||||
{file = "royalspells-3.2.tar.gz", hash = "sha256:2bd4a9a66514532e35c02c3907425af48c7cb292364c4843c795719a82b25dfe"},
|
{file = "royalspells-3.2.tar.gz", hash = "sha256:2bd4a9a66514532e35c02c3907425af48c7cb292364c4843c795719a82b25dfe"},
|
||||||
|
|
2
publish.bat
Normal file
2
publish.bat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
git commit -am "publish: %1"
|
||||||
|
git push && poetry build && poetry publish && hub release create "%1" -m "Royalnet %1"
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "royalpack"
|
name = "royalpack"
|
||||||
version = "5.5"
|
version = "5.5.1"
|
||||||
description = "A Royalnet command pack for the Royal Games community"
|
description = "A Royalnet command pack for the Royal Games community"
|
||||||
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
||||||
license = "AGPL-3.0+"
|
license = "AGPL-3.0+"
|
||||||
|
|
|
@ -65,7 +65,7 @@ class SteammatchCommand(Command):
|
||||||
users.append(author)
|
users.append(author)
|
||||||
|
|
||||||
for arg in args:
|
for arg in args:
|
||||||
user = await asyncify(Alias.find_by_alias, self.alchemy, data.session, arg)
|
user = await Alias.find_user(self.alchemy, data.session, arg)
|
||||||
users.append(user)
|
users.append(user)
|
||||||
|
|
||||||
if len(users) < 2:
|
if len(users) < 2:
|
||||||
|
|
|
@ -49,7 +49,7 @@ class TriviaCommand(rc.Command):
|
||||||
for index, ts in enumerate(sorted(trivia_scores, key=lambda ts: -ts.score)):
|
for index, ts in enumerate(sorted(trivia_scores, key=lambda ts: -ts.score)):
|
||||||
if index > 3:
|
if index > 3:
|
||||||
index = 3
|
index = 3
|
||||||
strings.append(f"{self._medal_emojis[index]} {ts.royal.username}: [b]{ts.score:.0f}p[/b]"
|
strings.append(f"{self._medal_emojis[index]} {ts.user.username}: [b]{ts.score:.0f}p[/b]"
|
||||||
f" ({ts.correct_answers}/{ts.total_answers})")
|
f" ({ts.correct_answers}/{ts.total_answers})")
|
||||||
await data.reply("\n".join(strings))
|
await data.reply("\n".join(strings))
|
||||||
return
|
return
|
||||||
|
@ -128,7 +128,7 @@ class TriviaCommand(rc.Command):
|
||||||
for answerer_id in self._answerers[question_id]:
|
for answerer_id in self._answerers[question_id]:
|
||||||
answerer = data.session.query(self.alchemy.get(User)).get(answerer_id)
|
answerer = data.session.query(self.alchemy.get(User)).get(answerer_id)
|
||||||
if answerer.trivia_score is None:
|
if answerer.trivia_score is None:
|
||||||
ts = self.interface.alchemy.get(TriviaScore)(royal=answerer)
|
ts = self.interface.alchemy.get(TriviaScore)(user=answerer)
|
||||||
data.session.add(ts)
|
data.session.add(ts)
|
||||||
await ru.asyncify(data.session.commit)
|
await ru.asyncify(data.session.commit)
|
||||||
previous_score = answerer.trivia_score.score
|
previous_score = answerer.trivia_score.score
|
||||||
|
|
|
@ -9,11 +9,11 @@ class TriviaScore:
|
||||||
__tablename__ = "triviascores"
|
__tablename__ = "triviascores"
|
||||||
|
|
||||||
@declared_attr
|
@declared_attr
|
||||||
def royal_id(self):
|
def user_id(self):
|
||||||
return Column(Integer, ForeignKey("users.uid"), primary_key=True)
|
return Column(Integer, ForeignKey("users.uid"), primary_key=True)
|
||||||
|
|
||||||
@declared_attr
|
@declared_attr
|
||||||
def royal(self):
|
def user(self):
|
||||||
return relationship("User", backref=backref("trivia_score", uselist=False))
|
return relationship("User", backref=backref("trivia_score", uselist=False))
|
||||||
|
|
||||||
@declared_attr
|
@declared_attr
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
semantic = "5.5"
|
semantic = "5.5.1"
|
||||||
|
|
Loading…
Reference in a new issue