@@ -1859,11 +1859,12 @@ async def get_application_command(
18591859 """
18601860 application_id = int (application_id )
18611861
1862- if not guild_id :
1862+ if guild_id in ( None , "None" ) :
18631863 return await self ._req .request (Route ("GET" , f"/applications/{ application_id } /commands" ))
1864- return await self ._req .request (
1865- Route ("GET" , f"/applications/{ application_id } /guilds/{ guild_id } /commands" )
1866- )
1864+ else :
1865+ return await self ._req .request (
1866+ Route ("GET" , f"/applications/{ application_id } /guilds/{ guild_id } /commands" )
1867+ )
18671868
18681869 async def create_application_command (
18691870 self , application_id : Union [int , Snowflake ], data : dict , guild_id : Optional [int ] = None
@@ -1881,7 +1882,7 @@ async def create_application_command(
18811882
18821883 url = (
18831884 f"/applications/{ application_id } /commands"
1884- if not guild_id
1885+ if guild_id in ( None , "None" )
18851886 else f"/applications/{ application_id } /guilds/{ guild_id } /commands"
18861887 )
18871888
@@ -1933,7 +1934,7 @@ async def edit_application_command(
19331934 application_id = application_id ,
19341935 command_id = command_id ,
19351936 )
1936- if not guild_id
1937+ if guild_id in ( None , "None" )
19371938 else Route (
19381939 "PATCH" ,
19391940 "/applications/{application_id}/guilds/" "{guild_id}/commands/{command_id}" ,
@@ -1965,7 +1966,7 @@ async def delete_application_command(
19651966 command_id = command_id ,
19661967 guild_id = guild_id ,
19671968 )
1968- if guild_id
1969+ if guild_id not in ( None , "None" )
19691970 else Route (
19701971 "DELETE" ,
19711972 "/applications/{application_id}/commands/{command_id}" ,
0 commit comments