From 94886afb598f0d4f9e460c81e4ce6b7442c559ce Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 15 May 2020 19:30:43 +0200 Subject: [PATCH] Impedisci alla gente di inviarsi fiorygi da soli --- royalpack/commands/givefiorygi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/royalpack/commands/givefiorygi.py b/royalpack/commands/givefiorygi.py index 18bcda28..87bf4965 100644 --- a/royalpack/commands/givefiorygi.py +++ b/royalpack/commands/givefiorygi.py @@ -23,6 +23,8 @@ class GivefiorygiCommand(rc.Command): user = await rbt.User.find(self.alchemy, data.session, user_arg) if user is None: raise rc.InvalidInputError("L'utente specificato non esiste!") + if user.uid == author.uid: + raise rc.InvalidInputError("Non puoi inviare fiorygi a te stesso!") if qty_arg is None: raise rc.InvalidInputError("Non hai specificato una quantità!")