Skip to content

Custom SIML Adapters

Łukasz Domeradzki edited this page Jun 18, 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.


ArchiChatRandomUserNickname

It accepts a ChatID and returns a random user from the chat. It's expected to be used with ChatID user-provided variable or with a hardcoded one (like steam-412 for Touhou Giveaways).

Usage example:

<Response>
	<ArchiChatRandomUserNickname>steam-412</ArchiChatRandomUserNickname>
</Response>

Result:

Archi


ArchiChatUserID

It accepts a ChatID 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>
	<ArchiChatUserID>steam-412 Arch</ArchiChatUserID>
</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 (string) and description (string), 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 were 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

It accepts user's ID and variable name and returns the value of said variable for that user, or null in case of failure. Remember that Users are initialized when they first interact with the bot, so using an uninitialized user's 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 into English after trying to detect the input's language, or null in case of failure.

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 Location as the input and returns information about the weather. For the best results, a city should be used.

Usage example:

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

Result:

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

Clone this wiki locally