# 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)
,但它也在计算类别。
答案 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
标签;)