有没有一种方法可以让slackbot在其调用的任何通道中发布

时间:2019-09-26 17:51:19

标签: javascript node.js slack

slackbot可以在一个频道中发布,但是我想知道是否有一种方法可以允许它在安装/调用的任何频道中发布。

bot.on('start', () => {
   const params = {
        icon_emoji: ':cat:'
    };

    bot.postMessageToChannel('general','It is a bot.', params);
 });

1 个答案:

答案 0 :(得分:0)

遍历多个渠道吗?


import pandas as pd
import numpy as np

dfLista_90 = pd.read_excel('my_excel.xlsx', index_col = 0) # to include the headers

count = 0
limit = 200
rows = len(dfLista_90)
partition = (rows // limit) + 1

def chunker(df, size):
    return (df[pos:pos + size] for pos in range(0, len(df), size))

for a in chunker(dfLista_90, limit):
    to_excel = np.array_split(a, partition)
    count += 1
    a.to_excel('file_{:02d}.xlsx'.format(count), index=True)