文字和语音通道计数

时间:2019-10-30 16:56:39

标签: javascript discord

# some transformations
df.write.mode("overwrite").saveAsTable("test")
df = spark.sql("select * from test")
# some transormations    ---------> 3 mts

# some transformations
df.createOrReplaceTempView("test")
df.count() #action statement for view to be created
df = spark.sql("select * from test")
# some more transformations  --------> 8 mts.    

我正在使用它来计算文本/语音通道的数量,`:speech_balloon: Channels ${message.guild.channels.filter(m => m.type === 'all'.size)}`,`[** ${message.guild.channels.filter(m => m.type === 'text').size}** ] | [** ${message.guild.channels.filter(m => m.type === 'voice').size} **]`,true) 不起作用,我尝试了message.guild.channels.filter(m => m.type === 'all'.size),但它也在计算类别。

1 个答案:

答案 0 :(得分:0)

计数所有个渠道,不包括类别:

message.guild.channels.filter((c) => c.type !== "category").size;

计数文本个频道:

message.guild.channels.filter((c) => c.type === "text").size;

计数文本语音频道:

message.guild.channels.filter((c) => c.type === "text" || c.type === "voice").size;

下次,在您的问题中添加discord.js标签;)