mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 12:29:30 +02:00
Add route to directly add to provided server ID in route
This commit is contained in:
@@ -38,13 +38,18 @@ def me():
|
|||||||
<body><img src='{user.avatar_url}' />
|
<body><img src='{user.avatar_url}' />
|
||||||
<a href={url_for("my_connections")}>Connections</a>
|
<a href={url_for("my_connections")}>Connections</a>
|
||||||
<br />
|
<br />
|
||||||
<a href={user.add_to_guild(475549041741135881)}>Add me to square server!</a>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/add_to/<int:guild_id>/")
|
||||||
|
def add_to_guild(guild_id):
|
||||||
|
user = discord.fetch_user()
|
||||||
|
return user.add_to_guild(guild_id)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/me/connections/")
|
@app.route("/me/connections/")
|
||||||
def my_connections():
|
def my_connections():
|
||||||
user = discord.fetch_user()
|
user = discord.fetch_user()
|
||||||
|
|||||||
Reference in New Issue
Block a user