コード例 #1
0
ファイル: hornybot.py プロジェクト: christianhelps/HornyBot
def main():
    # The token from the 'Bot' tab, not the 'General Information' tab.
    keyfile = open('keys/discord-key', 'r') 
    TOKEN = keyfile.readline()
    
    bot = client_wrapper.ClientWrapper()
    bot.run(TOKEN)
コード例 #2
0
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# old_universe_info.py
# Copyright (C) 2005-2009 Simon Newton
"""Lists the active universes."""

__author__ = '[email protected] (Simon Newton)'

import client_wrapper
from ola.OlaClient import Plugin


def Devices(state, devices):
    for device in sorted(devices):
        print 'Device %d: %s' % (device.alias, device.name)
        print 'Input ports:'
        for port in device.input_ports:
            print '  port %d, %s' % (port.id, port.description)
        print 'Output ports:'
        for port in device.output_ports:
            print '  port %d, %s' % (port.id, port.description)
    wrapper.Stop()


wrapper = client_wrapper.ClientWrapper()
client = wrapper.Client()
#client.FetchDevices(Devices, Plugin.OLA_PLUGIN_DUMMY)
client.FetchDevices(Devices)
wrapper.Run()