mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-10 04:19:31 +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}' />
|
||||
<a href={url_for("my_connections")}>Connections</a>
|
||||
<br />
|
||||
<a href={user.add_to_guild(475549041741135881)}>Add me to square server!</a>
|
||||
</body>
|
||||
</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/")
|
||||
def my_connections():
|
||||
user = discord.fetch_user()
|
||||
|
||||
Reference in New Issue
Block a user