mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
Save discord user id in flask session
This commit is contained in:
@@ -110,10 +110,13 @@ class User(DiscordModelsBase):
|
|||||||
[cls, ...]
|
[cls, ...]
|
||||||
List of instances of this model when many of these models exist."""
|
List of instances of this model when many of these models exist."""
|
||||||
self = super().fetch_from_api()
|
self = super().fetch_from_api()
|
||||||
|
session["DISCORD_USER_ID"] = self.id
|
||||||
|
|
||||||
if guilds:
|
if guilds:
|
||||||
self.fetch_guilds()
|
self.fetch_guilds()
|
||||||
if connections:
|
if connections:
|
||||||
self.fetch_connections()
|
self.fetch_connections()
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def add_to_guild(self, guild_id) -> dict:
|
def add_to_guild(self, guild_id) -> dict:
|
||||||
|
|||||||
Reference in New Issue
Block a user