mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 11:34:18 +00:00
Allow deletion of drawn gifts
This commit is contained in:
parent
41378fabbe
commit
36750480fb
3 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ class DelgiftCommand(Command):
|
||||||
syntax: str = ""
|
syntax: str = ""
|
||||||
|
|
||||||
async def run(self, args: CommandArgs, data: CommandData) -> None:
|
async def run(self, args: CommandArgs, data: CommandData) -> None:
|
||||||
gift = data.session.query(self.alchemy.get(XmasGift)).filter_by(drawn=False, gift_id=int(args[0])).order_by(func.random()).first()
|
gift = data.session.query(self.alchemy.get(XmasGift)).filter_by(gift_id=int(args[0])).order_by(func.random()).first()
|
||||||
data.session.delete(gift)
|
data.session.delete(gift)
|
||||||
await data.reply(f"🎁 Regalo eliminato (bye bye!):\n"
|
await data.reply(f"🎁 Regalo eliminato (bye bye!):\n"
|
||||||
f"{gift}")
|
f"{gift}")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
semantic = "1.0"
|
semantic = "1.0.1"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "giftpack"
|
name = "giftpack"
|
||||||
description = "A pack for the gift drawing at the Xmas 2019 family lunch"
|
description = "A pack for the gift drawing at the Xmas 2019 family lunch"
|
||||||
version = "1.0"
|
version = "1.0.1"
|
||||||
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
||||||
license = "AGPL-3.0+"
|
license = "AGPL-3.0+"
|
||||||
homepage = "https://github.com/Steffo99/giftpack"
|
homepage = "https://github.com/Steffo99/giftpack"
|
||||||
|
|
Loading…
Reference in a new issue