很抱歉问了一个相对简单的问题,但我似乎无法在网上找到答案
答案 0 :(得分:2)
您可以使用 someMessage.guild
获取消息的公会。
https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=guild
这给出了一个具有 guild
属性的 id
实例。您可以使用 someMessage.guild.id
获取它
https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=id
答案 1 :(得分:1)
简单! var resized:Bitmap = Bitmap.createScaledBitmap(bitmap, 320,320,true)
val model = ModelJerawatAutoml.newInstance(this)
// Creates inputs for reference.
val normalizedInputImageTensor = TensorImage.fromBitmap(bitmap)
// Runs model inference and gets result.
val outputs = model.process(normalizedInputImageTensor)
val locations = outputs.locationsAsTensorBuffer
val classes = outputs.classesAsTensorBuffer
val scores = outputs.scoresAsTensorBuffer
val numberOfDetections = outputs.numberOfDetectionsAsTensorBuffer
textView1.setText((locations.floatArray[0] ).toString())
textView2.setText((locations.floatArray[1]).toString())
textView3.setText((locations.floatArray[2]).toString())
textView4.setText((locations.floatArray[3]).toString())
<message>.guild.id