Creating a Discord Login System in Python Flask
ฝัง
- เผยแพร่เมื่อ 4 ก.ค. 2021
- In this video, I show you how you can create a Discord Oauth Login system in Flask (Python) using an open source library called Zenora.
Zenora is a synchronous library for accessing the Discord REST API. It allows you to access the API without async/await. And also gives you REST-only API access, not the gateway. Pretty useful for making bot web dashboards, or desktop applications, etc. Oauth and other features will be added soon.
😀SUBSCRIBE for more videos! / ahnafzamil
➤ My other YT: bit.ly/2RbkEBX
➤ My Discord Server: / discord
Links
=====
Zenora: github.com/ahnaf-zamil/zenora
Flask: github.com/pallets/flask
Discord API docs: / discord
Software Used
============
Recording: OBS Studio
Thumbnail: Gimp
Editing: KdenLive
Hope you enjoy this video, I am open to feedback. Please subscribe and like, it helps me out a lot!
Anyways, have a good day ^-^ - วิทยาศาสตร์และเทคโนโลยี
It's mad how helpful this really is. Thanks for the amazing library. I saw in a comment you said you'd become fed up with the discord API, and I fully understand why. But still, thanks for keeping it up to date too!
It's all good. I've also been getting tons of requests for a fetch_user_guilds method in order to get the logged in user's guilds, and I've recently released it in Zenora v0.0.3 with tons of bug fixes. Happy development :D
@@devguyahnaf I used the get_my_guilds function but I get on almost everything none.
Fix pls.
@@Noma4321 Is that so? Kindly open an issue on the Zenora github page
Awesome thanks for Zenora!
Wow just wow, thank you so much!
I was about to give up on... and then I found this video! Tysm! You have earned a subscriber ;)
Cheers, good luck!
Thnx@@devguyahnaf
Thanks! really helped
very helpful pkg thanks :D
First, love your videos
:D
hello, I have tried resetting my token and secret key a bunch of times and followed the tutorial, but when I try to log in it says "Invalid token has been passed"
it just keeps going to the code= part on the website
what vscode theme r u using?
Love the resource! However, is it possible to fetch the current user's guilds somehow?
Not at the moment, also I do not maintain Zenora anymore since I'm quite fed up with the Discord API. Who knows, I might change my mind since Zenora was my first "big" lib and I love it a lot :)
Heads up, I've just implemented a method to get user's guilds.
If you have a Zenora APIClient instance called "client", you can get the current user's guilds using "client.users.get_my_guilds()"
github.com/ahnaf-zamil/zenora/blob/master/zenora/api/userapi.py
good as milk
is it possible to run the discord bot in the same app as flask?
If you have multiple threads, sure. But I highly discourage it, because ur bot might need to shard later on and that's gonna be a problem.
Rather, run ur bot and flask app separately, and make them communicate through HTTP, IPC, or RPC
@@devguyahnaf Would using the ipc extension allow me to access functions from my discord bot from my flask server?
Like do some data validating and return a response?
Thank you for taking the time to read this.
@@TylerdPool I'm not sure about Discord.py IPC, so I can't tell tbh. But there are other IPC libraries for Python that you can use
its all good till we know we cant join servers