Skip to content

Instantly share code, notes, and snippets.

@karuhi
Last active August 14, 2020 10:09
Show Gist options
  • Save karuhi/76a6780152681b77d72b21ba3a94eb97 to your computer and use it in GitHub Desktop.
Save karuhi/76a6780152681b77d72b21ba3a94eb97 to your computer and use it in GitHub Desktop.
function postStat(message) {
var num = queue.length - 10;
var text =
(num > 0 ? ":u6e80:" : ":u7a7a:") +
" プライベートマッチ " +
queue.length +
"/10 (順番待ち:" +
(num > 0 ? num : 0) +
")";
if (statmsg != null) {
console.log(statmsg);
console.log(statmsg.Promise.Message.id);
message.guild.channels.cache.get(stat_roomID).fetchMessage(statmsg.id).then(msg => {
if (msg) msg.edit("Your new message.");
});
} else statmsg = message.guild.channels.cache.get(stat_roomID).send(text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment