![]() sleep ( 30 ) if _name_ = '_main_' : asyncio. run () # opens the websocket connection to receive events while True : await asyncio. get_current_user ()) print ( await myclient. Websockets / WS Client (asynchron) from import WSClient import asyncio class CustomClient ( WSClient ): async def on_event ( self, event ) -> None : print ( event ) # None : token = '' #all_intents: list = WSClient.get_intents_list() ws_client = CustomClient ( token = token, intents =, ) # Almost every endpoint can be accessed via the websocket client. ![]() get_application_commands ( application_id = '' )) user = User ( token = token ) print ( user. ![]() get_stage_instance ( channel_id = '' )) app = Application ( token = token ) print ( app. get_guild ( guild_id = '' )) stage = Stage ( token = token ) print ( stage. create_message ( channel_id = '', content = 'Hello World!' ) guild = Guild ( token = token ) print ( guild. Synchron REST Clients from import Application, User, Guild, Channel, Stage, Webhook token = 'your-discord-token' channel = Channel ( token = token ) channel. Python3 -m pip install python-discord-client
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |