1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Give fiorygi to users who connect their accounts to Royalnet

This commit is contained in:
Steffo 2020-04-29 18:57:32 +02:00
parent dbf867fb7a
commit 5c7801d4c0
2 changed files with 6 additions and 2 deletions

View file

@ -6,7 +6,7 @@ import sentry_sdk
from royalnet.commands import * from royalnet.commands import *
from royalnet.utils import * from royalnet.utils import *
from royalnet.serf.telegram import * from royalnet.serf.telegram import *
from ..tables import LeagueOfLegends from ..tables import LeagueOfLegends, FiorygiTransaction
from ..types import LeagueLeague from ..types import LeagueLeague
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -204,6 +204,8 @@ class LeagueoflegendsCommand(Command):
data.session.add(leagueoflegends) data.session.add(leagueoflegends)
await data.session_commit() await data.session_commit()
await data.reply(f"↔️ Account {leagueoflegends} connesso a {author}!") 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: else:
# Update and display the League of Legends stats for the current account # Update and display the League of Legends stats for the current account
if len(author.leagueoflegends) == 0: if len(author.leagueoflegends) == 0:

View file

@ -1,7 +1,7 @@
from typing import * from typing import *
from royalnet.commands import * from royalnet.commands import *
from royalnet.utils import * from royalnet.utils import *
from ..tables.steam import Steam from ..tables import Steam, FiorygiTransaction
import steam import steam
import datetime import datetime
@ -68,6 +68,8 @@ class SteampoweredCommand(Command):
data.session.add(steam_account) data.session.add(steam_account)
await data.session_commit() await data.session_commit()
await data.reply(f"↔️ Account {steam_account} connesso a {author}!") 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: else:
# Update and display the Steam info for the current account # Update and display the Steam info for the current account
if len(author.steam) == 0: if len(author.steam) == 0: