adityajat/GuessWordle_botPublic · Bot Template
AIWordle BOT appears to be a Telegram automation bot. Commands include /start, /*, /new, /help, /end. Observed in code: messaging, keyboards, games, payments.
Utilityutility
5 commands0 envUpdated 1mo agoCreated Sep 15, 2026
commands/_.js
javascript · 229 lines
1/**#command2name: *3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// WORDLE — GUESS13 14let game = Bot.getProperty(15 "wordle_game_" + user.telegramid16);17 18if (!game) {19 Bot.sendMessage("❌ No active game. Use /new");20 return;21}22 23let guess = String(message || "").trim().toLowerCase();24 25if (!/^[a-z]{5}$/.test(guess)) {26 Bot.sendMessage(27 "❌ Please enter exactly 5 letters."28 );29 return;30}31 32let answer = String(game.answer)33 .trim()34 .toLowerCase();35 36if (!Array.isArray(game.attempts)) {37 game.attempts = [];38}39 40// Don't allow the same guess twice41if (game.attempts.indexOf(guess) !== -1) {42 Bot.sendMessage(43 "⚠️ You already guessed " +44 guess.toUpperCase()45 );46 return;47}48 49game.attempts.push(guess);50 51 52// ================================53// WORDLE CHECK54// ================================55 56function checkWord(guess, answer) {57 58 let blocks = [59 "🟥",60 "🟥",61 "🟥",62 "🟥",63 "🟥"64 ];65 66 let remaining = answer.split("");67 68 // Green69 for (let i = 0; i < 5; i++) {70 71 if (guess[i] === answer[i]) {72 blocks[i] = "🟩";73 remaining[i] = null;74 }75 }76 77 // Yellow78 for (let i = 0; i < 5; i++) {79 80 if (blocks[i] === "🟩") {81 continue;82 }83 84 let position =85 remaining.indexOf(guess[i]);86 87 if (position !== -1) {88 blocks[i] = "🟨";89 remaining[position] = null;90 }91 }92 93 return blocks;94}95 96 97// ================================98// CREATE BOARD99// ================================100 101let board = "";102 103for (let i = 0; i < game.attempts.length; i++) {104 105 let current =106 game.attempts[i];107 108 let blocks =109 checkWord(current, answer);110 111 board +=112 blocks.join(" ") +113 " " +114 current.toUpperCase() +115 "\n";116}117 118 119// ================================120// WIN121// ================================122 123if (guess === answer) {124 125 let points =126 Number(127 Bot.getProperty(128 "wordle_points_" +129 user.telegramid130 ) || 0131 );132 133 points += 5;134 135 Bot.setProperty(136 "wordle_points_" +137 user.telegramid,138 points,139 "integer"140 );141 142 Bot.setProperty(143 "wordle_game_" +144 user.telegramid,145 null146 );147 148 Bot.sendMessage(149 "🎉 YOU WON!\n\n" +150 151 "5-letter mode · " +152 game.attempts.length +153 "/30\n\n" +154 155 board +156 157 "🎁 +5 points\n" +158 "⭐ Total points: " +159 points +160 "\n\n" +161 162 "The word was: " +163 answer.toUpperCase() +164 "\n\n" +165 166 "Play again with /new"167 );168 169 return;170}171 172 173// ================================174// GAME OVER175// ================================176 177if (game.attempts.length >= 30) {178 179 Bot.setProperty(180 "wordle_game_" +181 user.telegramid,182 null183 );184 185 Bot.sendMessage(186 "😔 GAME OVER!\n\n" +187 188 "5-letter mode · 30/30\n\n" +189 190 board +191 192 "The word was: " +193 answer.toUpperCase() +194 "\n\n" +195 196 "Play again with /new"197 );198 199 return;200}201 202 203// ================================204// SAVE GAME205// ================================206 207Bot.setProperty(208 "wordle_game_" +209 user.telegramid,210 game,211 "json"212);213 214 215// ================================216// SEND BOARD217// ================================218 219Bot.sendMessage(220 "🎯 WORDSEEK\n\n" +221 222 "5-letter mode · " +223 game.attempts.length +224 "/30\n\n" +225 226 board227);228 229return;