Skip to main content

Can I Die In...

Use It On Your Stream

Send us the name of your Twitch category and we will tell you whether you can die in that game. Your bot can use the answer to switch a death counter on or off.

The requests

There are two addresses: one for a sentence to post in chat, and one for the answer on its own. Each is a single GET request with the category name on the end. Both find games the same way, and no key or sign-up is needed.

For chat

GET https://can-i-die.in/api/chat/<category name>

A sentence your bot can post as it is. Right now, it says:

The sentence is in English unless you add ?lang= and one of these codes: en, fr, es, de, ja, ko, zh, it, pl, ru, ar. The commands on this page already ask for the language you are reading it in. The reason for an answer is included when we have it written in that language.

When we have no answer, the sentence says so and asks for help on GitHub. A category that is not a game, such as Just Chatting, gets a joke instead, a different one each time. Either way, the reply is never empty.

For automation

GET https://can-i-die.in/api/<category name>

The answer on its own, for a tool that acts on it, such as Streamer.bot switching a death counter on or off.

The reply is plain text, and one of three things:

true
You can die in this game.
false
You cannot die in this game.
404
An empty reply. No game has that name, or we have no answer for it yet.

A game's slug works in place of its name. The slug is the last part of the address of the game's page here, such as baldurs-gate-iii.

Setting up your bot

Each example below reads your current category and asks about it, so the answer follows you when you change game. Nightbot, StreamElements and Fossabot post the sentence from the chat address. Streamer.bot gets the answer on its own, to act on.

Streamer.bot

Add these two sub-actions to an action, in this order:

  1. Twitch › User › Get User Info for Target, with User Login set to %broadcastUserName%. This puts your category in %game%. If the action is not started by a Twitch trigger, put Add Broadcaster Information before it.
  2. Core › Network › Fetch URL, with Variable Name set to canDie and this as the URL:
    https://can-i-die.in/api/%game%

%canDie% then holds true, false, or nothing when there is no answer. Test it with an If/Else sub-action.

Nightbot

Send this in your chat to add a !candie command:

!commands add !candie $(urlfetch https://can-i-die.in/api/chat/$(querystring $(twitch $(channel) "{{game}}")))

StreamElements

Send this in your chat:

!command add !candie $(customapi https://can-i-die.in/api/chat/$(pathescape $(game)))

Fossabot

Create a command with this as its response:

$(customapi https://can-i-die.in/api/chat/$(pathencode $(game)))

Anything else

Any tool that can fetch a web address will work. Browser sources and overlays can call it too, from any site.

curl "https://can-i-die.in/api/Pok%C3%A9mon%20Red%20Version"

How names are matched

Our game names come from IGDB, which is also where Twitch gets its categories, so most names match as they are. Capitals, accents and punctuation are ignored, and a sequel's number can be written either way: “3” finds “III”, and “III” finds “3”. Here is what some names return right now:

Name sentReplyWhy
FirewatchfalseA plain name. Capitals do not matter, so “firewatch” and “FIREWATCH” work too.
Pokémon Red VersiontrueAccents are optional. “Pokemon Red Version” finds the same game.
Animal Crossing: New HorizonsfalsePunctuation is ignored, so the colon can be left out.
Friday Night Funkin'falseApostrophes are optional. “Friday Night Funkin” works as well.
Baldur's Gate 3trueTwitch names this category with a 3, where our data has III. Roman numerals and ordinary numbers are treated as the same, so the Twitch name still finds it.
Forza Horizon VfalseThe same the other way round. Our data has this game as “Forza Horizon 5”.
Fate/Grand OrdertrueA slash in the name works, written as it is or as %2F.
100% Orange JuicetrueA percent sign has to be sent as %25. Bots do this for you when you use their encoding variable.
Until DawnfalseSeveral games share this name. You get the one we have an answer for, and the most popular of those.
Just Chatting404, emptyNot a game, so there is no answer.
baldurs-gate-iiitrueA slug, taken from the address of the game's page here. It always finds exactly that game.

Category finds nothing? Search for the game on the main list and use the slug from its page instead.