Skip to content

Commit 65da5ca

Browse files
docs: fix method slug
1 parent c6c0c1f commit 65da5ca

2 files changed

Lines changed: 33 additions & 33 deletions

File tree

streamerbot/3.api/3.csharp/3.methods/twitch/chat/twitch-chat-pin-message.md

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: TwitchChatPinChatMessage
3+
title: TwitchChatPinChatMessage
4+
description: Pins a chat message in Twitch
5+
version: 1.0.5
6+
parameters:
7+
- name: messageId
8+
description: Twitch chat message ID to pin
9+
- name: duration
10+
default: null
11+
description: |
12+
The duration to pin the chat message for.
13+
- `null` for the pin to last till the end of the stream
14+
- between `30` and `1800` - duration in seconds
15+
example: |
16+
using System;
17+
public class CPHInline
18+
{
19+
public bool Execute()
20+
{
21+
// get the message id from an argument
22+
if (!CPH.TryGetValue<string>("msgId", out var msgId))
23+
{
24+
return false;
25+
}
26+
27+
// pin the chat message till the end of the stream
28+
CPH.TwitchChatPinChatMessage(msgId);
29+
30+
return true;
31+
}
32+
}
33+
---

0 commit comments

Comments
 (0)