Skip to content

Miscelaneous

AnkhHeart edited this page Feb 25, 2018 · 3 revisions

Getting a Random Number

Function

int GetRandom(int min, int max)

Use in Python

result = Parent.GetRandom(0,100)

Retrieve the Currency Platform that the Chatbot is being used on

Function

string GetStreamingService()

Use in Python

result = Parent.GetStreamingService()

Getting the Stream's Channel Name (Only applicable to Twitch)

Function

string GetChannelName()

Use in Python

result = Parent.GetChannelName()

Retrieving the Stream's Currency Name

Function

string GetCurrencyName()

Use in Python

result = Parent.GetCurrencyName()

Logging Information to the Bot's Log Window

Function

void Log(string scriptName, string message)

Use in Python

result = Parent.Log(ScriptName,"Look mom! I am logging!")

Attempt to Play a sound if Possible

Function

bool PlaySound(string filePath, float volume)

Use in Python

result = Parent.PlaySound("C:\airhorn.mp3",1.0)

Retrieve X amount of Users that are in the Queue at the moment

Function

PythonDictionary<int,string> GetQueue(int max)

Use in Python

result = Parent.GetQueue(10)

for obj in result :
     Parent.Log(ScriptName,obj.Value)

Clone this wiki locally