mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +02:00
Test suit for user connections
This commit is contained in:
@@ -35,6 +35,24 @@ def me():
|
|||||||
<title>{user.name}</title>
|
<title>{user.name}</title>
|
||||||
</head>
|
</head>
|
||||||
<body><img src='{user.avatar_url}' />
|
<body><img src='{user.avatar_url}' />
|
||||||
|
<a href={url_for("my_connections")}>Connections</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/me/connections/")
|
||||||
|
def my_connections():
|
||||||
|
user = discord.fetch_user()
|
||||||
|
connections = discord.fetch_connections()
|
||||||
|
return f"""
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{user.name}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{str([f"{connection.name} - {connection.type}" for connection in connections])}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user