Ruster.NET Addons v1.0.2

Hooks & API for Ruster.NET v4.2.1

API

Browser
void OpenBrowser ( ulong userId )
Opens the browser for a specific player.

Template:
RusterAddons.Call ( "OpenBrowser", userId );
void CloseBrowser ( ulong userId )
Closes the browser for a specific player.

Template:
RusterAddons.Call ( "CloseBrowser", userId );
void OpenModal ( ulong userId, JObject modal, Action<Dictionary<string, string>> onSubmit, Action onCancel )
Opens a custom modal with customized title, description and fields. On cancel / submit get triggered on user input.

Template:
RusterAddons.Call ( "OpenModal", userId, modal, onSubmit, onCancel );
Example:
var userId = 1234UL;
var modal = new JObject ()
{
    [ "Title" ] = "My Title";
    [ "Description" ] = $"This is my awesome description! Also, this is some content: {post [ "Content" ]}";
    [ "Fields" ] = JObject.Parse ( JsonConvert.SerializeObject ( new Dictionary<string, JObject> ()
    {
        [ "test" ] = new JObject ()
        {
            [ "Title" ] = "Field #1",
            [ "IsRequired" ] = true,
            [ "DefaultValue" ] = "Potatoes suck!"
        },
        [ "test1" ] = new JObject ()
        {
            [ "Title" ] = "Field #2",
            [ "Description" ] = "To yeet or not to yeet."
        },
    } 
} ) );

RusterAddons?.Call ( "OpenModal", userId, modal,
    new Action<Dictionary<string, string>> ( ( values ) => { Puts ( $"Test worked. {values["test"]} and {values["test1"]}" ); } ),
    new Action ( () => { Puts ( $"Test cancelled." ); } ) );
void OpenColorPicker ( ulong userId, Action<string, string> onColorPicked, Action onCancel )
Opens the color picker. On cancel / submit get triggered on user input.

Template:
RusterAddons.Call ( "OpenColorPicker", userId, onColorPicked, onCancel );
Returns: onColorPicked return the HEX and Unity color (0 0 0) in both of its parameters.

Example:
RusterAddons?.Call ( "OpenColorPicker", userId,
    new Action<string, string> ( ( hex, color ) => { Puts ( $"You've picked {hex}, aka {color}." ); } ),
    new Action ( () => { Puts ( $"Cancelled color picker." ); } ) );

// Output example: [RusterAddonsTest] You've picked D95C16FF, aka 0.85, 0.36125, 0.08750001.
General
string IsBlockedTonite ( bool isJamieLeeOrJackieChan )
It does or does not answer our humanity's most asked question.

Template:
RusterAddons.Call<string> ( "IsBlockedTonite", isJamieLeeOrJackieChan );
Returns: Game crash.

Example:
var isJamieLeeOrJackieChan = true;
var call = RusterAddons.Call<string> ( "IsBlockedTonite", isJamieLeeOrJackieChan );
Puts ( call );
throw new Exception ( "This is some stupid insanity." );
ulong GetCommunityFeedId ( )
Used for grabbing the Community feed setup.

Template:
RusterAddons.Call<ulong> ( "GetCommunityFeedId" );
Returns: Returns the Community Feed-ID.
ulong GetMarketplaceFeedId ( )
Used for grabbing the Marketplace feed setup.

Template:
RusterAddons.Call<ulong> ( "GetMarketplaceFeedId" );
Returns: Returns the Marketplace Feed-ID.
ulong GetBlackmarketFeedId ( )
Used for grabbing the Blackmarket feed setup.

Template:
RusterAddons.Call<ulong> ( "GetBlackmarketFeedId" );
Returns: Returns the Blackmarket Feed-ID.
ulong GetRedRoomFeedId ( )
Used for grabbing the RedRoom feed setup.

Template:
RusterAddons.Call<ulong> ( "GetRedRoomFeedId" );
Returns: Returns the RedRoom Feed-ID.
ulong GetRusterSkinId ( )
Used for grabbing the Ruster workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterSkinId" );
Returns: Returns the Ruster workshop skin ID.
ulong GetRusterMarketplace24hAdvertSkinId ( )
Used for grabbing the Ruster Marketplace 24h Advert workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterMarketplace24hAdvertSkinId" );
Returns: Returns the Ruster Marketplace 24h Advert workshop skin ID.
ulong GetRusterMarketplace1wAdvertSkinId ( )
Used for grabbing the Ruster Marketplace 1w Advert workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterMarketplace1wAdvertSkinId" );
Returns: Returns the Ruster Marketplace 1w Advert workshop skin ID.
ulong GetRusterBusinessCardSkinId ( )
Used for grabbing the Ruster Business Card workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterBusinessCardSkinId" );
Returns: Returns the Ruster Business Card workshop skin ID.
ulong GetRusterShortFlipbookSkinId ( )
Used for grabbing the Ruster Short Flipbook workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterShortFlipbookSkinId" );
Returns: Returns the Ruster Short Flipbook workshop skin ID.
ulong GetRusterMediumFlipbookSkinId ( )
Used for grabbing the Ruster Medium Flipbook workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterMediumFlipbookSkinId" );
Returns: Returns the Ruster Medium Flipbook workshop skin ID.
ulong GetRusterLongFlipbookSkinId ( )
Used for grabbing the Ruster Long Flipbook workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterLongFlipbookSkinId" );
Returns: Returns the Ruster Long Flipbook workshop skin ID.
ulong GetRusterLegitLotteryTicketSkinId ( )
Used for grabbing the Ruster Legit Lottery Ticket workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterLegitLotteryTicketSkinId" );
Returns: Returns the Ruster Legit Lottery Ticket workshop skin ID.
ulong GetRusterLuckyCharmLotteryTicketSkinId ( )
Used for grabbing the Ruster Lucky-Charm Lottery Ticket workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterLuckyCharmLotteryTicketSkinId" );
Returns: Returns the Ruster Lucky-Charm Lottery Ticket workshop skin ID.
ulong GetRusterIconicLotteryTicketSkinId ( )
Used for grabbing the Ruster Iconic Lottery Ticket workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterIconicLotteryTicketSkinId" );
Returns: Returns the Ruster Iconic Lottery Ticket workshop skin ID.
ulong GetRusterGiftCardSkinId ( )
Used for grabbing the Ruster Gift-Card workshop skin ID.

Template:
RusterAddons.Call<ulong> ( "GetRusterGiftCardSkinId" );
Returns: Returns the Ruster Gift-Card workshop skin ID.
User
ulong[] GetUsers ( )
Gets all users.

Template:
RusterAddons.Call<ulong[]> ( "GetUsers" );
Returns: Returns all users in the server.
JObject GetUser ( ulong id )
Gets user.

Template:
RusterAddons.Call<JObject> ( "GetUser", id );
Returns: Returns user in the server.
bool IsAdmin ( ulong userId )
Checks if an user is an administrator on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsAdmin", userId );
Returns: Is user an admin?
bool IsModerator ( ulong userId )
Checks if an user is a moderator on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsModerator", userId );
Returns: Is user a moderator?
bool IsVerified ( ulong userId )
Checks if an user is verified on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsVerified", userId );
Returns: Is user verified?
bool IsDeveloper ( ulong userId )
Checks if an user is a developer on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsDeveloper", userId );
Returns: Is user a developer?
bool IsBot ( ulong userId )
Checks if an user is a bot on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsBot", userId );
Returns: Is user a bot?
bool IsDead ( ulong userId )
Checks if an user is marked as dead on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsDead", userId );
Returns: Is user dead?
bool IsOnline ( ulong userId )
Checks if an user is marked as online on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsOnline", userId );
Returns: Is user online?
bool IsFriend ( ulong userId, ulong otherUserId )
Checks if two users are friends on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsFriend", userId, otherUserId );
Returns: Are users friends?
string GetDisplayName ( ulong userId, bool coloured )
Properly formatted user display name as seen on Ruster.NET.

Template:
RusterAddons.Call<string> ( "GetDisplayName", userId, coloured );
Returns: The display name of an user.
string GetUsername ( ulong userId )
Username as seen on Ruster.NET.

Template:
RusterAddons.Call<string> ( "GetUsername", userId );
Returns: The username of an user.
string GetLanguage ( ulong userId )
Language an user has set for their account on Ruster.NET.

Template:
RusterAddons.Call<string> ( "GetLanguage", userId );
Returns: The language of an user.
ulong[] GetFriends ( ulong userId )
Gets a list of SteamIDs of an user's friends on Ruster.NET.

Template:
RusterAddons.Call<ulong[]> ( "GetFriends", userId );
Returns: The friends list of an user.
ulong[] GetBlockedUsers ( ulong userId )
Gets a list of SteamIDs of an user's blocked accounts on Ruster.NET.

Template:
RusterAddons.Call<ulong[]> ( "GetBlockedUsers", userId );
Returns: The blocked list of an user.
int[] GetPosts ( ulong userId )
Gets a list of IDs of published posts for an user on Ruster.NET.

Template:
RusterAddons.Call<int[]> ( "GetPosts", userId );
Returns: The posts list of an user.
int[] GetStorePosts ( ulong userId )
Gets a list of IDs of published store posts for an user on Ruster.NET.

Template:
RusterAddons.Call<int[]> ( "GetStorePosts", userId );
Returns: The store posts list of an user.
int[] GetMarketplacePosts ( ulong userId )
Gets a list of IDs of published Marketplace posts for an user on Ruster.NET.

Template:
RusterAddons.Call<int[]> ( "GetMarketplacePosts", userId );
Returns: The Marketplace posts list of an user.
int[] GetAdvertPosts ( ulong userId )
Gets a list of IDs of published Advert posts for an user on Ruster.NET.

Template:
RusterAddons.Call<int[]> ( "GetAdvertPosts", userId );
Returns: The Advert posts list of an user.
ulong[] GetReceivedFriendRequests ( ulong userId )
Gets a list of SteamIDs for an user's received friend requests on Ruster.NET.

Template:
RusterAddons.Call<ulong[]> ( "GetReceivedFriendRequests", userId );
Returns: The received friend requests SteamID list of an user.
ulong[] GetSentFriendRequests ( ulong userId )
Gets a list of SteamIDs for an user's sent friend requests on Ruster.NET.

Template:
RusterAddons.Call<ulong[]> ( "GetSentFriendRequests", userId );
Returns: The sent friend requests SteamID list of an user.
bool HasBlocked ( ulong userId, ulong otherUserId )
Checks if an user blocked another user on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "HasBlocked", userId, otherUserId );
Returns: Is other user blocked by user?
bool HasBlockedCommunication ( ulong userId, ulong otherUserId )
Checks if two users have their communication blocked on Ruster.NET.

Template:
RusterAddons.Call<bool> ( "HasBlockedCommunication", userId, otherUserId );
Returns: Are two users communication blocked?
bool AddFriend ( ulong userId, ulong otherUserId )
If an user isn't friends with someone, a request will be sent their way and will be notified.

Template:
RusterAddons.Call<bool> ( "AddFriend", userId, otherUserId );
Returns: Request sent or not.
bool HandleFriendRequest ( ulong userId, ulong otherUserId, bool doAccept )
Handling a friend request, will accept/reject an existent friend request sent by the user.

Template:
RusterAddons.Call<bool> ( "HandleFriendRequest", userId, otherUserId, doAccept );
Returns: Request sent or not.
bool RemoveFriend ( ulong userId, ulong otherUserId )
If an user is friends with someone, they'll be removed from both users' lists.

Template:
RusterAddons.Call<bool> ( "RemoveFriend", userId, otherUserId );
Returns: Has removed friend or not.
JObject CreateOrUpdateUser ( JObject user, bool overrideProperties )
Creates or updates an user with the input information (must come with the ID).

Template:
RusterAddons.Call<JObject> ( "CreateOrUpdateUser", user, overrideProperties );
Returns: The user from the database.
void GiveBusinessCard ( JObject player, ulong userId )
Gives a business card to a player with the user's credentials.

Template:
RusterAddons.Call ( "GiveBusinessCard", player, userId );
Bot
void CreateBot ( ulong botId, char prefix, Type type, Plugin plugin )
Creates a bot and uses the type value to install the bot commands. The bot gets uninstalled once the plugin's unloaded. Customize the bot using the CreateOrUpdateUser API call.

Template:
RusterAddons.Call ( "CreateBot", botId, prefix, type, plugin );
Example:
public static class MyAwesomeBot
{
    public static void CommandName1 ( int conversationId, ulong botId, string command, string [] arguments )
    {
        Instance.Puts ( "Command called!" );
    }

    public static string CommandName2 ( int conversationId, ulong botId, string command, string [] arguments )
    {
        return $"Print this in chat. You called: {command}";
    }
}

var botId = 12345UL;
var prefix = '!';
var type = typeof ( MyAwesomeBot );
var plugin = this;

RusterAddons.Call ( "CreateBot", botId, prefix, type, plugin );

// Go to your DMs, have a custom group, add your bot in the group and call <prefix>commandname1 or <prefix>commandname2 in DM chat.
Post
bool IsAdvert ( int postId )
Checks if a post provided with an ID is an advertisment in Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsAdvert", postId );
Returns: Is post an advert or not?
bool IsMarketplaceListing ( int postId )
Checks if a post provided with an ID is a Marketplace listing in Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsMarketplaceListing", postId );
Returns: Is post a Marketplace listing or not?
bool IsOverdue ( int postId )
When the post is an advertisment, checks if a post provided with an ID is overdue its duration in Ruster.NET.

Template:
RusterAddons.Call<bool> ( "IsOverdue", postId );
Returns: Is advert overdue or not?
bool IsReply ( int postId )
Checks if a post provided with an ID a reply to a parent thread or not.

Template:
RusterAddons.Call<bool> ( "IsReply", postId );
Returns: Is post a reply or not?
bool HasLiked ( int postId, ulong userId )
Checks if an user has liked a post provided with the ID or not.

Template:
RusterAddons.Call<bool> ( "HasLiked", postId, userId );
Returns: Has user liked the post or not?
bool HasDisliked ( int postId, ulong userId )
Checks if an user has disliked a post provided with the ID or not.

Template:
RusterAddons.Call<bool> ( "HasDisliked", postId, userId );
Returns: Has user disliked the post or not?
string GetContent ( int postId )
Gets the content of a post.

Template:
RusterAddons.Call<string> ( "GetContent", postId );
Returns: The content of a post.
int GetAdvertTimeLeft ( int postId )
If the post is an advertisment, it'll return the time left 'till it's overdue.

Template:
RusterAddons.Call<int> ( "GetAdvertTimeLeft", postId );
Returns: The advert time left 'till it's overdue.
JObject[] GetHashtags ( int postId )
Gets all the hashtags (custom or auto-generated) of a post.

Template:
RusterAddons.Call<JObject[]> ( "GetHashtags", postId );
Returns: Post hashtags.
ulong[] GetLikes ( int postId )
Gets a list the like Steam IDs of a post.

Template:
RusterAddons.Call<ulong[]> ( "GetLikes", postId );
Returns: Post likes.
ulong[] GetDislikes ( int postId )
Gets a list the dislike Steam IDs of a post.

Template:
RusterAddons.Call<ulong[]> ( "GetDislikes", postId );
Returns: Post dislikes.
JObject GetAuthor ( int postId )
Gets the author of a post with the provided post ID.

Template:
RusterAddons.Call<JObject> ( "GetAuthor", postId );
Returns: Database user.
ulong GetFeed ( int postId )
Gets the parent feed of a post with the provided post ID.

Template:
RusterAddons.Call<ulong> ( "GetFeed", postId );
Returns: The feed ID of where the post has been published into.
string GetPostType ( int postId )
Gets the parent feed type of a post with the provided post ID.

Template:
RusterAddons.Call<string> ( "GetPostType", postId );
Returns: The feed type of where the post has been published into.
bool CanGetForFree ( int postId, ulong userId )
Can the given user get the listing post item for free?

Template:
RusterAddons.Call<bool> ( "CanGetForFree", postId, userId );
bool CanBuy ( int postId, ulong userId )
Can the given user buy the listing post item?

Template:
RusterAddons.Call<bool> ( "CanBuy", postId, userId );
bool LikePost ( int postId, ulong userId )
Attemtps to like a post with the given user.

Template:
RusterAddons.Call<bool> ( "LikePost", postId, userId );
Returns: The post has been liked.
bool LikePost ( JObject post, ulong userId )
Attemtps to like a post with the given user.

Template:
RusterAddons.Call<bool> ( "LikePost", post, userId );
Returns: The post has been liked.
bool DislikePost ( int postId, ulong userId )
Attemtps to dislike a post with the given user.

Template:
RusterAddons.Call<bool> ( "DislikePost", postId, userId );
Returns: The post has been disliked.
bool DislikePost ( JObject post, ulong userId )
Attemtps to dislike a post with the given user.

Template:
RusterAddons.Call<bool> ( "DislikePost", post, userId );
Returns: The post has been disliked.
bool RemoveLikeOrDislikePost ( int postId, ulong userId )
Attemtps to remove a like or dislike from a post with the given user.

Template:
RusterAddons.Call<bool> ( "RemoveLikeOrDislikePost", postId, userId );
Returns: Has removed like or dislike from post.
bool RemoveLikeOrDislikePost ( JObject post, ulong userId )
Attemtps to remove a like or dislike from a post with the given user.

Template:
RusterAddons.Call<bool> ( "RemoveLikeOrDislikePost", post, userId );
Returns: Has removed like or dislike from post.
bool PinPost ( int postId, ulong userId )
Attempts to pin a post on the parent feed.

Template:
RusterAddons.Call<bool> ( "PinPost", postId, userId );
Returns: The post has been pinned.
bool PinPost ( JObject post, ulong userId )
Attempts to pin a post on the parent feed.

Template:
RusterAddons.Call<bool> ( "PinPost", post, userId );
Returns: The post has been pinned.
bool UnpinPost ( int postId, ulong userId )
Attempts to unpin a post from the parent feed.

Template:
RusterAddons.Call<bool> ( "UnpinPost", postId, userId );
Returns: The post has been unpinned.
bool UnpinPost ( JObject post, ulong userId )
Attempts to unpin a post from the parent feed.

Template:
RusterAddons.Call<bool> ( "UnpinPost", post, userId );
Returns: The post has been unpinned.
Feed
string GetFeedTitle ( ulong feedId )
Gets the title of a feed with id.

Template:
RusterAddons.Call<string> ( "GetFeedTitle", feedId );
Returns: Feed title.
int GetFeedType ( ulong feedId )
Gets the type of a feed with id.

Template:
RusterAddons.Call<int> ( "GetFeedType", feedId );
Returns: Feed type.
bool CanPost ( ulong feedId, ulong userId )
Checks if the user can post in a feed or not.

Template:
RusterAddons.Call<bool> ( "CanPost", feedId, userId );
Returns: Can post in the feed or not.
bool CanDelete ( ulong feedId, ulong userId, int postId )
Can user delete the post or not.

Template:
RusterAddons.Call<bool> ( "CanDelete", feedId, userId, postId );
Returns: User can delete.
JObject GetOwner ( ulong feedId )
Get the owner of the feed (if any).

Template:
RusterAddons.Call<JObject> ( "GetOwner", feedId );
Returns: Feed owner.
JObject[] GetHashtags ( ulong feedId )
Get all the hashtags from feed with id.

Template:
RusterAddons.Call<JObject[]> ( "GetHashtags", feedId );
Returns: Feed hashtags.
bool IsCommunity ( ulong feedId )
Is a community feed or not.

Template:
RusterAddons.Call<bool> ( "IsCommunity", feedId );
Returns: Is community feed.
bool IsMarketplace ( ulong feedId )
Is a marketplace feed or not.

Template:
RusterAddons.Call<bool> ( "IsMarketplace", feedId );
Returns: Is marketplace feed.
JObject CreatePost ( ulong feedId, ulong authorId, JObject post )
Creates a post and publishes it onto a feed.

Template:
RusterAddons.Call<JObject> ( "CreatePost", feedId, authorId, post );
Returns: Returns the published post.
string DeletePost ( ulong feedId, int postId )
Deletes a post from feed.

Template:
RusterAddons.Call<string> ( "DeletePost", feedId, postId );
Returns: Returns the result (could be a reason of why it didn't get removed).
DM
int GetOrCreateConversation ( ulong creatorId, ulong otherId )
Gets or creates a conversation with someone.

Template:
RusterAddons.Call<int> ( "GetOrCreateConversation", creatorId, otherId );
Returns: Returns the ID of the conversation created / found.
ulong[] GetConversationUserIds ( int conversationId )
Get all users in the conversation.

Template:
RusterAddons.Call<ulong[]> ( "GetConversationUserIds", conversationId );
Returns: Returns users.
JObject[] GetConversationUsers ( int conversationId )
Get all users in the conversation.

Template:
RusterAddons.Call<JObject[]> ( "GetConversationUsers", conversationId );
Returns: Returns users.
JObject SendMessage ( int conversationId, JObject message )
Sends a message into a conversation, notifying viewers of the conversation.

Template:
RusterAddons.Call<JObject> ( "SendMessage", conversationId, message );
Returns: Returns the published message.
int[] GetMessages ( int conversationId, int amount )
Gets messages with an amount from a conversation. Use -1 amount to get ALL messages.

Template:
RusterAddons.Call<int[]> ( "GetMessages", conversationId, amount );
Returns: Message IDs.
bool DeleteMessage ( int conversationId, int messageId )
Deletes a message from a conversation.

Template:
RusterAddons.Call<bool> ( "DeleteMessage", conversationId, messageId );
Returns: Returns true if the message has been removed.
int PurgeConversation ( int conversationId )
Deletes all messages from a conversation.

Template:
RusterAddons.Call<int> ( "PurgeConversation", conversationId );
Returns: Returns the amount of purged messages.
void MarkMessage ( int conversationId, int messageId, bool read )
Marks a message as read or not.

Template:
RusterAddons.Call ( "MarkMessage", conversationId, messageId, read );
Returns: Nothing.

Hooks

Browser
void OnBrowserOpen ( ulong userId )
Called when the browser opened.

Template:
void OnBrowserOpen ( ulong userId )
{

}
void OnBrowserClose ( ulong userId )
Called when the browser closed.

Template:
void OnBrowserClose ( ulong userId )
{

}
void OnCouponAdded ( ulong userId, string coupon )
Called whenever an user added a new coupon to their account.

Template:
void OnCouponAdded ( ulong userId, string coupon )
{

}
void OnCouponRemoved ( ulong userId, string coupon )
Called whenever an user removed a coupon from their account.

Template:
void OnCouponRemoved ( ulong userId, string coupon )
{

}
General
void OnLanguageChange ( ulong userId, string language, string previousLanguage )
Called whenever an user modifies their Ruster.NET language.

Template:
void OnLanguageChange ( ulong userId, string language, string previousLanguage )
{

}
Returns: User ID, pdated language and previous language.
void OnCustomNameChange ( ulong userId, string oldName, string newName )
Called whenever an user changes their nickname in Ruster.NET.

Template:
void OnCustomNameChange ( ulong userId, string oldName, string newName )
{

}
Returns: User ID, older nickname and newer nickname.
void OnWithdraw ( ulong userId, int amountWithdrawn )
Called whenever an user withdrawed their wallet in Ruster.NET.

Template:
void OnWithdraw ( ulong userId, int amountWithdrawn )
{

}
Returns: User ID, amount withdrawn.
void OnRestock ( ulong userId, RusterPost[] postsRestocked )
Called whenever an user restocks one or more posts.

Template:
void OnRestock ( ulong userId, JObject[] postsRestocked )
{

}
Returns: User ID, an array of posts that have been restocked.
void OnHashtagFilter ( ulong userId, int browserPage, RusterHashtag hashtag )
Called whenever an user filters a feed.

Template:
void OnHashtagFilter ( ulong userId, int browserPage, JObject hashtag )
{

}
Returns: User ID, browser page (indicating the index of a feed in Ruster.NET) and hashtag.
void OnHashtagFilterClear ( ulong userId, int browserPage )
Called whenever an user cleared a feed hashtag filter.

Template:
void OnHashtagFilterClear ( ulong userId, int browserPage )
{

}
Returns: User ID and browser page (indicating the index of a feed in Ruster.NET).
Post
void OnPostCreated ( RusterPost post, bool silent )
Called when a new post has been created / published.

Template:
void OnPostCreated ( JObject post, bool silent )
{

}
Returns: The post and if it has been a silent publish or not.
void OnPostDeleted ( RusterPost post, bool silent )
Called when a post has been deleted / unpublished.

Template:
void OnPostDeleted ( JObject post, bool silent )
{

}
Returns: The post and if it has been a silent deletion/unpublish or not.
void OnPostOpen ( ulong userId, RusterPost post )
Called whenever a post has been opened by an user.

Template:
void OnPostOpen ( ulong userId, JObject post )
{

}
Returns: User ID and the post.
void OnPostClose ( ulong userId, RusterPost post )
Called whenever a post has been closed by an user.

Template:
void OnPostClose ( ulong userId, JObject post )
{

}
Returns: User ID and the post.
void OnPostPinned ( ulong userId, ulong feedId, RusterPost post )
Called whenever a post has been pinned.

Template:
void OnPostPinned ( ulong userId, ulong feedId, JObject post )
{

}
Returns: User ID and the pinned post.
void OnPostUnpinned ( ulong userId, ulong feedId, RusterPost post )
Called whenever a post has been unpinned.

Template:
void OnPostUnpinned ( ulong userId, ulong feedId, JObject post )
{

}
Returns: User ID and the unpinned post.
void OnPostPlay ( ulong userId, RusterPost post )
Called when an user plays the audio-clip of a post.

Template:
void OnPostPlay ( ulong userId, JObject post )
{

}
Returns: User ID, the post.
void OnPostStop ( ulong userId, RusterPost post )
Called when an user stops the audio-clip of a post.

Template:
void OnPostStop ( ulong userId, JObject post )
{

}
Returns: User ID, the post.
DM
void OnDMSent ( int conversationId, RusterDirectMessage message, bool silent )
Called when a direct message has been sent.

Template:
void OnDMSent ( int conversationId, JObject message, bool silent )
{

}
Returns: The message.
void OnBotDMSent ( int conversationId, RusterDirectMessage message, bool silent )
Called when a direct message has been sent to a bot.

Template:
void OnBotDMSent ( int conversationId, JObject message, bool silent )
{

}
Returns: The message.

Types

RusterFeed
JSON structure of RusterFeed.

Template:
{
  "Id": 0,
  "Title": null,
  "BackgroundUrl": null,
  "DarkMode": false,
  "FeedType": 0,
  "Posts": [],
  "HexBackgroundColor": "#FF4C00",
  "HexTitleColor": "#FFFFFF",
  "HexDarkTitleColor": "#000000",
  "HexSubtitleColor": "#FFFFFF",
  "HexDarkSubtitleColor": "#000000",
  "AllowAdverts": true,
  "AllowRatings": true,
  "AllowPurchases": true,
  "AllowRestocking": true,
  "AllowDeleting": true,
  "AllowPlay": true,
  "AllowPinning": true,
  "ShowLocation": true,
  "ShowRatings": true,
  "ShowReplies": true,
  "ShowDate": true,
  "DisableFleaMarket": false,
  "IsLocked": false,
  "EnableCensorship": true,
  "AllowBlacklistedItems": false,
  "CanFilter": true,
  "ShowHashtags": true,
  "Hashtags": null,
  "WhitelistedListingItems": [],
  "BlacklistedListingItems": []
}
RusterPost
JSON structure of RusterPost.

Template:
{
  "Id": 0,
  "UserId": 0,
  "Ticks": 0,
  "Content": null,
  "EditedContent": null,
  "PhotoUrl": null,
  "PhotoTag": null,
  "CassetteId": 0,
  "CassetteTitle": null,
  "PostType": 0,
  "Advert": null,
  "Gif": null,
  "Poll": null,
  "MarketplaceListing": null,
  "Location": {
    "Name": null,
    "Position": null
  },
  "Likes": [],
  "Dislikes": [],
  "Hashtags": null,
  "CanRate": true,
  "IsPinned": false,
  "EmbedPhoto": false,
  "EmbedPhotoRatio": 1.0
}
RusterMarketplaceListing
JSON structure of RusterMarketplaceListing.

Template:
{
  "CustomName": null,
  "Shortname": null,
  "Skin": 0,
  "SkinIconUrl": null,
  "Text": null,
  "Amount": 1,
  "AmountLeft": 1,
  "Price": 1,
  "SubEntityId": 0,
  "IsPurchased": false,
  "WholeStack": true,
  "Coupon": null
}
RusterStory
JSON structure of RusterStory.

Template:
{
  "Views": [],
  "Id": 0,
  "UserId": 0,
  "Ticks": 0,
  "Content": null,
  "EditedContent": null,
  "PhotoUrl": null,
  "PhotoTag": null,
  "CassetteId": 0,
  "CassetteTitle": null,
  "PostType": 0,
  "Advert": null,
  "Gif": null,
  "Poll": null,
  "MarketplaceListing": null,
  "Location": {
    "Name": null,
    "Position": null
  },
  "Likes": [],
  "Dislikes": [],
  "Hashtags": null,
  "CanRate": true,
  "IsPinned": false,
  "EmbedPhoto": false,
  "EmbedPhotoRatio": 1.0
}
RusterCoupon
JSON structure of RusterCoupon.

Template:
{
  "Code": null,
  "Discount": 0.0,
  "MaximumUses": -1,
  "Uses": []
}
RusterTransaction
JSON structure of RusterTransaction.

Template:
{
  "UserId": 0,
  "Coupon": null,
  "Discount": 0.0,
  "Item": null,
  "Name": null,
  "SkinId": 0,
  "Amount": 0,
  "Price": 0,
  "Ticks": 0
}
RusterUser
JSON structure of RusterUser.

Template:
{
  "Id": 0,
  "AvatarUrl": "https://steamuserimages-a.akamaihd.net/ugc/885384897182110030/F095539864AC9E94AE5236E04C8CA7C2725BCEFF/",
  "TimezoneOffset": 0.0,
  "CurrentDisplayName": null,
  "CustomDisplayName": null,
  "CustomAvatarUrl": "",
  "CustomFrameUrl": "",
  "CustomBannerUrl": "https://cdn.discordapp.com/attachments/844914604080889867/940095981117132841/RustClient_yhjZdgAtpR.png",
  "AboutMe": "Not set.",
  "Wallet": 0,
  "Friends": [],
  "Blocked": [],
  "IsBot": false,
  "AllowBusinessCard": true,
  "Configuration": {
    "Language": null,
    "PerformanceMode": false,
    "PinAudioPlayer": true,
    "PinNotificationTray": false,
    "Ratio": 16.0,
    "DeveloperBypass": false,
    "PushNotifications": true,
    "FriendsNotifications": true,
    "RustPlusNotifications": true,
    "DMNotifications": true,
    "ChatNotifications": true,
    "GifDuration": 10.0,
    "GifBoomerang": true,
    "PrivacyMode": false,
    "PaymentMethod": 0,
    "GiftMode": false,
    "Coupons": [],
    "AppliedCoupons": []
  },
  "Notifications": []
}
RusterGif
JSON structure of RusterGif.

Template:
{
  "Boomerang": false,
  "Bleeding": 0.1,
  "FrameUrls": []
}
RusterFlipbook
JSON structure of RusterFlipbook.

Template:
{
  "Id": null,
  "ThumbnailUrl": null,
  "MaximumFrames": 0,
  "Frames": 0
}
RusterModal
JSON structure of RusterModal.

Template:
{
  "Title": null,
  "Description": null,
  "Fields": {}
}
Example:
{
  "Title": "Report",
  "Description": "Report this player for something that's unholy.",
  "Fields": {
    "field01": {
      "Title": "My Field #01",
      "Description": "My not-mandatory description.",
      "IsRequired": true,
      "CanBeEmpty": false,
      "FieldType": 2,
      "DefaultValue": null,
      "Value": null
    },
    "field02": {
      "Title": "My Field #02",
      "Description": null,
      "IsRequired": false,
      "CanBeEmpty": false,
      "FieldType": 0,
      "DefaultValue": null,
      "Value": null
    }
  }
}
RusterField
JSON structure of RusterField.

Template:
{
  "Title": "My Field",
  "Description": null,
  "IsRequired": false,
  "CanBeEmpty": false,
  "FieldType": 0,
  "DefaultValue": null,
  "Value": null
}
RusterLicensedItem
JSON structure of RusterLicensedItem.

Template:
{
  "DisplayName": null,
  "Value": null,
  "Price": 0,
  "Author": "Raul-Sorin Sorban",
  "ItemType": 0
}
RusterGiftCard
JSON structure of RusterGiftCard.

Template:
{
  "Value": 0,
  "CreatorId": 0
}
RusterUserConfiguration
JSON structure of RusterUserConfiguration.

Template:
{
  "Language": null,
  "PerformanceMode": false,
  "PinAudioPlayer": true,
  "PinNotificationTray": false,
  "Ratio": 16.0,
  "DeveloperBypass": false,
  "PushNotifications": true,
  "FriendsNotifications": true,
  "RustPlusNotifications": true,
  "DMNotifications": true,
  "ChatNotifications": true,
  "GifDuration": 10.0,
  "GifBoomerang": true,
  "PrivacyMode": false,
  "PaymentMethod": 0,
  "GiftMode": false,
  "Coupons": [],
  "AppliedCoupons": []
}
RusterUserNotification
JSON structure of RusterUserNotification.

Template:
{
  "Id": 0,
  "Content": null,
  "IsRead": false,
  "Ticks": 0,
  "Amount": 1,
  "NotificationType": 0
}
RusterConversation
JSON structure of RusterConversation.

Template:
{
  "Id": 1691230343,
  "CustomTitle": null,
  "IsLocked": false,
  "ConversationType": 0,
  "CanDelete": true,
  "CanReact": true,
  "CanManage": false,
  "Users": [],
  "ViewerList": [],
  "Messages": []
}
RusterDirectMessage
JSON structure of RusterDirectMessage.

Template:
{
  "Id": 0,
  "SenderId": 0,
  "Message": null,
  "Reaction": null,
  "Ticks": 0,
  "Status": 0,
  "IsSystemMessage": false,
  "PhotographUrl": null,
  "CassetteId": 0,
  "IsTradeRequest": false,
  "IsTradeFinished": false,
  "FeedId": 0,
  "PostId": 0
}
RusterEmoji
JSON structure of RusterEmoji.

Template:
{
  "Name": null,
  "Shortname": null,
  "IconUrl": null,
  "IsPremiumEmoji": false
}
RusterFriendRequest
JSON structure of RusterFriendRequest.

Template:
{
  "SentById": 0,
  "SentToId": 0,
  "Tick": 0
}
RusterHashtag
JSON structure of RusterHashtag.

Template:
{
  "Instances": 1,
  "Filter": null,
  "FilterType": 0
}
RusterBusinessCard
JSON structure of RusterBusinessCard.

Template:
{
  "UserId": 0
}
RusterBot
JSON structure of RusterBot.

Template:
{
  "Id": 0,
  "Prefix": "!",
  "Plugin": null,
  "Commands": []
}
Command
JSON structure of Command.

Template:
{
  "BotId": 0,
  "Name": null,
  "IsVoid": false
}