Skip to main content

Adding Points

Introduction

Modifiers exist to make it easy for you to syncronize your application up with ChatRPG point systems default stats.

For example, lets say you want to increase the amount of points a user gets when they chat, you can simply pass in a modifier to do that!

This is particularly helpful when theres an event going on, or a user equips a piece of armor that modifiers their chat.

Send a request to the server

You should include your cliendId and clientSecret in the body, so the server can find your extension.

Important API URL:

https://points.chatrpg.com/points/modify

Body

    userId: "User ID to add modifiers to",
streamerId: "Streamer the User is currently on",
modifierId: "ID chosen by your application to represent you, make it unique and treat it as a secret key",
modifier: "The modifier of choice and the amount. Must be an object. Full list below",

Example of Usage

const response = await axios.post(`https://points.chatrpg.com/points/modify`, {
userId: "CRPG1COWSEPUSER",
streamerId: "CRPG1COWSEPSTREAMER",
modifierId: "MySuperCoolRandomId",
modifier: {
flatMessage: 10,
percentMessage: 5
}
});

Fields you can input into modifier field:

  • flatMessage: Extra points per Chat Message
  • percentMessage: Extra percentage points per Chat Message (100% is double the points, also increases flatMessage)
  • flatConnectionPerHour: Extra points per hour
  • percentConnectionPerHour: Extra points per hour by a percentage, that further increases the flat amount