Advertisement
Guest User

modis launcher.py suggestion

a guest
Nov 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. import modis
  2. import os
  3.  
  4. DISCORD_TOKEN = "Discord bot token here"
  5. CLIENT_ID = "Discord bot client ID here"
  6.  
  7. try:
  8.     os.environ["DISPLAY"]
  9.     print("Display connected, launching in GUI mode...")
  10.     modis.gui(
  11.         discord_token=DISCORD_TOKEN,
  12.         discord_client_id=CLIENT_ID
  13.     )
  14.  
  15. except:
  16.     print("No Display connected, launching in  console mode...")
  17.    
  18.     modis.gui(
  19.         discord_token=DISCORD_TOKEN,
  20.         discord_client_id=CLIENT_ID
  21.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement