From 5c7801d4c0ff13612628e1513573e8d4c8b02747 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 29 Apr 2020 18:57:32 +0200 Subject: [PATCH] Give fiorygi to users who connect their accounts to Royalnet --- royalpack/commands/leagueoflegends.py | 4 +++- royalpack/commands/steampowered.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/royalpack/commands/leagueoflegends.py b/royalpack/commands/leagueoflegends.py index 493289ab..eca6f67b 100644 --- a/royalpack/commands/leagueoflegends.py +++ b/royalpack/commands/leagueoflegends.py @@ -6,7 +6,7 @@ import sentry_sdk from royalnet.commands import * from royalnet.utils import * from royalnet.serf.telegram import * -from ..tables import LeagueOfLegends +from ..tables import LeagueOfLegends, FiorygiTransaction from ..types import LeagueLeague log = logging.getLogger(__name__) @@ -204,6 +204,8 @@ class LeagueoflegendsCommand(Command): data.session.add(leagueoflegends) await data.session_commit() await data.reply(f"↔️ Account {leagueoflegends} connesso a {author}!") + await FiorygiTransaction.spawn_fiorygi(data, author, 1, + "aver connesso il proprio account di League of Legends a Royalnet") else: # Update and display the League of Legends stats for the current account if len(author.leagueoflegends) == 0: diff --git a/royalpack/commands/steampowered.py b/royalpack/commands/steampowered.py index 34156b2f..6de0612a 100644 --- a/royalpack/commands/steampowered.py +++ b/royalpack/commands/steampowered.py @@ -1,7 +1,7 @@ from typing import * from royalnet.commands import * from royalnet.utils import * -from ..tables.steam import Steam +from ..tables import Steam, FiorygiTransaction import steam import datetime @@ -68,6 +68,8 @@ class SteampoweredCommand(Command): data.session.add(steam_account) await data.session_commit() await data.reply(f"↔️ Account {steam_account} connesso a {author}!") + await FiorygiTransaction.spawn_fiorygi(data, author, 1, + "aver connesso il proprio account di Steam a Royalnet") else: # Update and display the Steam info for the current account if len(author.steam) == 0: