mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-14 09:50:03 +00:00
Refactor utils.oauth_url slightly
This commit is contained in:
parent
40f12c8a00
commit
c232631504
@ -59,6 +59,7 @@ import datetime
|
||||
import functools
|
||||
from inspect import isawaitable as _isawaitable, signature as _signature
|
||||
from operator import attrgetter
|
||||
from urllib.parse import urlencode
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
@ -335,9 +336,6 @@ def oauth_url(
|
||||
url += f'&guild_id={guild.id}'
|
||||
if disable_guild_select:
|
||||
url += '&disable_guild_select=true'
|
||||
if redirect_uri is not MISSING or state is not MISSING:
|
||||
from urllib.parse import urlencode
|
||||
|
||||
if redirect_uri is not MISSING:
|
||||
url += '&response_type=code&' + urlencode({'redirect_uri': redirect_uri})
|
||||
if state is not MISSING:
|
||||
|
Loading…
x
Reference in New Issue
Block a user