React to message with emoji
I know it's probably something really simple but my bot sends a message not in response to an interaction. It should then react to that message with random emojis.
What am I missing?
const channel = client.channels.cache.get("1239901826221080637");
const checkinOptions = {
"FoodEmojis": [
"🥫",
"🥧",
"🍚",
"🍝",
"🍲",
"🍖",
":cut_of_meat:",
"🥐",
"🥨",
":french_bread:",
"🍞",
":salad:",
"🥪",
"🍗",
"🍔",
"🍕",
"🍜",
"🍛",
],
"DrinksEmojis": [
"🍹",
":beverage_box:",
":bubble_tea:",
"🥤",
":milk:",
"🍵",
"☕",
],
"ToiletEmojis": [
"🚽",
"💩"
],
"PetsEmojis": [
"🐈",
"🐕",
"🐟",
"🐦",
"🦜",
"🐍",
"🐹",
"🐁",
]
};
const emojiFood = checkinOptions.FoodEmojis[Math.floor(Math.random() * checkinOptions.FoodEmojis.length)];
const emojiDrinks = checkinOptions.DrinksEmojis[Math.floor(Math.random() * checkinOptions.DrinksEmojis.length)];
const emojiPets = checkinOptions.PetsEmojis[Math.floor(Math.random() * checkinOptions.PetsEmojis.length)];
messageSend.content = "Complete this check in today";
messageSend.embeds = [
new EmbedBuilder()
.setTitle(`${checkinOptions.Title[Math.floor(Math.random() * checkinOptions.Title.length)]}`)
.setDescription(`Make sure you get these things done by the end of the day.\n\nFood: ${emojiFood}\nDrinks: ${emojiDrinks}\nPets: ${emojiPets}`)
.setColor('#00FBDC')
];
messageSend.fetchReply = true;
const message = await channel.send(messageSend);
await message.react(`${emojiFood}`);
await message.react(`${emojiDrinks}`);
await message.react(`${emojiPets}`);const channel = client.channels.cache.get("1239901826221080637");
const checkinOptions = {
"FoodEmojis": [
"🥫",
"🥧",
"🍚",
"🍝",
"🍲",
"🍖",
":cut_of_meat:",
"🥐",
"🥨",
":french_bread:",
"🍞",
":salad:",
"🥪",
"🍗",
"🍔",
"🍕",
"🍜",
"🍛",
],
"DrinksEmojis": [
"🍹",
":beverage_box:",
":bubble_tea:",
"🥤",
":milk:",
"🍵",
"☕",
],
"ToiletEmojis": [
"🚽",
"💩"
],
"PetsEmojis": [
"🐈",
"🐕",
"🐟",
"🐦",
"🦜",
"🐍",
"🐹",
"🐁",
]
};
const emojiFood = checkinOptions.FoodEmojis[Math.floor(Math.random() * checkinOptions.FoodEmojis.length)];
const emojiDrinks = checkinOptions.DrinksEmojis[Math.floor(Math.random() * checkinOptions.DrinksEmojis.length)];
const emojiPets = checkinOptions.PetsEmojis[Math.floor(Math.random() * checkinOptions.PetsEmojis.length)];
messageSend.content = "Complete this check in today";
messageSend.embeds = [
new EmbedBuilder()
.setTitle(`${checkinOptions.Title[Math.floor(Math.random() * checkinOptions.Title.length)]}`)
.setDescription(`Make sure you get these things done by the end of the day.\n\nFood: ${emojiFood}\nDrinks: ${emojiDrinks}\nPets: ${emojiPets}`)
.setColor('#00FBDC')
];
messageSend.fetchReply = true;
const message = await channel.send(messageSend);
await message.react(`${emojiFood}`);
await message.react(`${emojiDrinks}`);
await message.react(`${emojiPets}`);What am I missing?