我正在写一个C#桌面app.in,这个应用程序,我写了一个用户的电报Id,上面写着用户是否是频道的成员。我的机器人是频道的管理员。
我使用telegram.bot v9 nugget,一整天都在搜索这个问题。
我尝试过在GetChatMembersCountAsync()和许多其他方法中使用v13,但是没有起作用。
static private Api bot = new Api("Token");
long id;
string channel="@ChannelName";
public Main()
{
下面是聊天(频道名为newchannel -当播放器执行命令时创建频道):
Bot: Hello, what's your name.
User: BaconSoda479
Bot: When is your birthday
User: 21/06/1999
Bot: Do you like this bot?
User: Yes
现在,我想将用户的所有消息发送到特定的通道,以便在通道中显示时创建一个如下所示的嵌入:
User: BaconSode479
Birthday: 21/06/1999
Opinion: Yes
我预计嵌入内容将类似于:
`User: ${client.ch
我是非常新的松弛api集成使用节点js。我正在努力了解频道的历史。甚至我也试过用chat.postMessage。但每次都会让我犯以下错误:
{ Error: An API error occurred: channel_not_found
at platformErrorFromResult (..\node_modules\@slack\client\dist\WebClient.js:747:42)
at __await.makeRequest.then (..\node_modules\@slack\client\dist\WebClient.js:464:39)
at
问题:不知道如何提到一个特定的频道,如果你们中的一些人能帮我运行这段代码就好了,但它没有提到操场频道
@bot.command()
async def prov(ctx):
if ctx.channel.id == 1028873503010717717:
await ctx.send("The bot is disabled in this channel!,\n try in #playground")
else:
我正在使用我的机器人来讲述重要的消息,但是当我使用sendMessage连接到频道时,我收到了以下错误:
{"ok":false,"error_code":403,"description":"Error: Forbidden: bot is not a participant of the channel"}
在中,他们提到不可能通过客户端向通道发送消息,但是另一种方法是什么呢?
所以,问题是,如何将我的机器人添加到频道中?