Skip to content

Custom SIML Adapters

Łukasz Domeradzki edited this page Mar 10, 2018 · 45 revisions

Custom SIML Adapters

This is a list of the custom SIML adapters available for use. A default delimiter for arguments in all available adapters is any whitespace character, such as a space, tab, or newline. In some specific adapters the default delimiter was limited to smaller subset of characters in order to allow wider choice of characters supplied as arguments. Extra out-of-bound arguments will be concatenated with last eligible argument, allowing you to use full range of whitespace characters in it.


ArchiChannelRandomUserNickname

It accepts a channel id and returns a random user from the chat. It's expected to be used with SourceID or with an hardcoded channel ID

Usage example:

<Response>
	<ArchiChannelRandomUserNickname>steam-110338190878500888</ArchiChannelRandomUserNickname>
</Response>

Result:

Archi


ArchiChannelUserID

It accepts a channel id and a query based on user's nickname. Returns ID of the user on the chat that was considered best match according to Levenshtein distance, or null if no match was found.

Usage example:

<Response>
	<ArchiChannelUserID>steam-110338190878500888 Arch</ArchiChannelUserID>
</Response>

Result:

steam-76561198006963719


ArchiDate

It accepts a location as input, for example a city or a country; it returns the current local date in that location.

Usage example 1:

<Response>
	<ArchiDate>Poland</ArchiDate>
</Response>

Result:

20/06/2017

Usage example 2:

<Response>
	<ArchiDate>Rome</ArchiDate>
</Response>

Result:

20/06/2017


ArchiDateTime

It accepts a location as input, for example a city or a country; it returns the interpreted input and the current local date and time in that location.

Usage example 1:

<Response>
	<ArchiDateTime>Poland</ArchiDateTime>
</Response>

Result:

Poland | 20/06/2017 14:20:53

Usage example 2:

<Response>
	<ArchiDateTime>Rome</ArchiDateTime>
</Response>

Result:

Italy | 20/06/2017 14:20:53


ArchiMantisSubmitIssue

It accepts EPriority, ESeverity, summary and description, all separated from each other with fixed tab (\t) character. This allows summary to include spaces or other whitespace characters (as description would use out-of-bound concatenation anyway).

After passing correct arguments, creates new issue on our tracker in ArchiBoT project, AI category. Returns null on failure and issueID (ushort) on success, which could be used for redirection (e.g. https://mantis.justarchi.net/view.php?id=29)

Usage example:

<Response>
	<ArchiMantisSubmitIssue>Default	Feature	Games picker idea	I think adding game picker could be nice, bot would return random Steam game for user</ArchiMantisSubmitIssue>
</Response>

Result:

29

EPriority is defined as:

internal enum EPriority : byte {
	Default,
	None = 10,
	Low = 20,
	Normal = 30,
	High = 40,
	Urgent = 50,
	Immediate = 60
}

ESeverity is defined as:

internal enum ESeverity : byte {
	Default,
	Feature = 10,
	Trivial = 20,
	Text = 30,
	Tweak = 40,
	Minor = 50,
	Major = 60,
	Crash = 70,
	Block = 80
}

ArchiPatreonCampaignPledge

It accepts a campaign id and returns the amount of dollars currently pledged to it by its patrons, as well as the campaign's type (monthly or per-creation).

To find the campaign id you can check the project main page's source and look for it, for example by searching for "pledge_url"

campaign id location

Usage example:

<Response>
	<ArchiPatreonCampaignPledge>316025</ArchiPatreonCampaignPledge>
</Response>

Result:

$57 per month


ArchiSteamGroupRandomUserNickname

It accepts a Steam group id and returns a random user from the group. Group refresh is done automatically if needed.

Usage example:

<Response>
	<ArchiSteamGroupRandomUserNickname>103582791437445144</ArchiSteamGroupRandomUserNickname>
</Response>

Result:

Archi


ArchiSteamRandomEmoticon

It returns a random emoticon from a list. Used with no argument the list used is the entire list of ArchiBoT's available emoticons, otherwise it will pick a random emoticon from the list provided (ArchiBoT will ignore emotes that it doesn't own)

Usage example 1:

<Response><ArchiSteamRandomEmoticon /></Response>

Result:

:Neko:

Usage example 2:

<Response>
	<ArchiSteamRandomEmoticon>:dice1: :dice2: :dice3:</ArchiSteamRandomEmoticon>
</Response>

Result:

:dice2:


ArchiSynBotLateTasksClear

It removes any pending <Late> task that was created by the current user. It requires no argument and returns no output.

Usage example:

<Response>I'll clear the late tasks for you!<ArchiSynBotLateTasksClear /></Response>

Result:

I'll clear the late tasks for you!


ArchiSynBotUserGet

Given a User ID and User variable name, it returns the value of said variable or null in case of failure. Remember that Users are initialized when they first interact with the bot, so using an uninitialized User ID will always result in the Adapter returning null.

The delimiter between the 2 arguments can be any whitespace, although a non-breaking space &nbsp; is advised if working with tags in xml.

Usage example:

<Response>
	<ArchiSynBotUserGet>steam-76561198006963719 Name</ArchiSynBotUserGet>
</Response>

Result:

Łukasz


ArchiTime

It accepts a location as input, for example a city or a country; it returns the current local time in that location.

Usage example 1:

<Response>
	<ArchiTime>Poland</ArchiTime>
</Response>

Result:

14:20:53

Usage example 2:

<Response>
	<ArchiTime>Rome</ArchiTime>
</Response>

Result:

14:20:53


ArchiTranslate

It accepts any input and translates it to English after trying to detect the input's language

Usage example:

<Response>
	<ArchiTranslate>Ogórek</ArchiTranslate>
</Response>

Result:

Cucumber


ArchiTranslateFrom

It accepts a source 2-letter ISO 639-1 formatted language code followed by whitespace and any message. It returns a translation of the message from the source language specified to English, or null in case of failure

Usage example:

<Response>
	<ArchiTranslateFrom>pl Ogórek</ArchiTranslateFrom>
</Response>

Result:

Cucumber


ArchiTranslateFromTo

It accepts a source and a target 2-letter ISO 639-1 formatted language code separated and followed by whitespace and any message. It returns a translation of the message from the source language to the target language specified, or null in case of failure

Usage example:

<Response>
	<ArchiTranslateFromTo>pl fr Ogórek</ArchiTranslateFromTo>
</Response>

Result:

Concombre


ArchiTranslateTo

It accepts a target 2-letter ISO 639-1 formatted language code followed by whitespace and any message. After trying to detect the input's language it returns a translation of it in the target language specified, or null in case of failure

Usage example:

<Response>
	<ArchiTranslateTo>fr Ogórek</ArchiTranslateTo>
</Response>

Result:

Concombre


ArchiWeather

It accepts a city as the input and returns information about the weather

Usage example:

<Response>
	<ArchiWeather>Warsaw</ArchiWeather>
</Response>

Result:

Warsaw, Masovian, Poland | 17°C/62°F | Mostly Cloudy

Clone this wiki locally