Skip to content

Commit

Permalink
disable SdImagesBot and QrCodeBot
Browse files Browse the repository at this point in the history
  • Loading branch information
fegloff committed Mar 11, 2024
1 parent 8c41f16 commit 78c9173
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 23 deletions.
36 changes: 18 additions & 18 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import {
import { mainMenu } from './pages'
import { TranslateBot } from './modules/translate/TranslateBot'
import { VoiceMemo } from './modules/voice-memo'
import { QRCodeBot } from './modules/qrcode/QRCodeBot'
import { SDImagesBot } from './modules/sd-images'
// import { QRCodeBot } from './modules/qrcode/QRCodeBot'
// import { SDImagesBot } from './modules/sd-images'
import { OpenAIBot } from './modules/open-ai'
import { OneCountryBot } from './modules/1country'
import { WalletConnect } from './modules/walletconnect'
Expand Down Expand Up @@ -242,8 +242,8 @@ bot.use(autoChatAction())
bot.use(mainMenu)

const voiceMemo = new VoiceMemo()
const qrCodeBot = new QRCodeBot()
const sdImagesBot = new SDImagesBot()
// const qrCodeBot = new QRCodeBot()
// const sdImagesBot = new SDImagesBot()
const walletConnect = new WalletConnect()
const payments = new BotPayments()
const schedule = new BotSchedule(bot)
Expand Down Expand Up @@ -364,8 +364,8 @@ const writeCommandLog = async (

const PayableBots: Record<string, PayableBotConfig> = {
voiceCommand: { bot: voiceCommand },
qrCodeBot: { bot: qrCodeBot },
sdImagesBot: { bot: sdImagesBot },
// qrCodeBot: { bot: qrCodeBot },
// sdImagesBot: { bot: sdImagesBot },
voiceTranslate: { bot: voiceTranslateBot },
voiceMemo: { bot: voiceMemo },
translateBot: { bot: translateBot },
Expand Down Expand Up @@ -448,24 +448,24 @@ const onMessage = async (ctx: OnMessageContext): Promise<void> => {

const onCallback = async (ctx: OnCallBackQueryData): Promise<void> => {
try {
if (qrCodeBot.isSupportedEvent(ctx)) {
await qrCodeBot.onEvent(ctx, (reason) => {
logger.error(`qr generate error: ${reason}`)
})
return
}
// if (qrCodeBot.isSupportedEvent(ctx)) {
// await qrCodeBot.onEvent(ctx, (reason) => {
// logger.error(`qr generate error: ${reason}`)
// })
// return
// }

if (telegramPayments.isSupportedEvent(ctx)) {
await telegramPayments.onEvent(ctx)
return
}

if (sdImagesBot.isSupportedEvent(ctx)) {
await sdImagesBot.onEvent(ctx, (e) => {
logger.info(e, '// TODO refund payment')
})
return
}
// if (sdImagesBot.isSupportedEvent(ctx)) {
// await sdImagesBot.onEvent(ctx, (e) => {
// logger.info(e, '// TODO refund payment')
// })
// return
// }

if (openAiBot.isSupportedEvent(ctx)) {
await openAiBot.onEvent(ctx, (e) => {
Expand Down
29 changes: 25 additions & 4 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,33 @@ Your credits in 1Bot Credits: $CREDITS
Send ONE to: \`$WALLET_ADDRESS\`
`,
more: `/ explain like i am 5, what is a superconductor?
. explain like i have a phd, what is category theory?
// more: `/ explain like i am 5, what is a superconductor?
// . explain like i have a phd, what is category theory?

// /images vintage hot rod with custom flame paint job

// /qr s.country/ai astronaut, exuberant, anime girl, smile, sky, colorful

// /connect (Wallet Connect to MetaMask / Gnosis Safe / Timeless)

// /send TARGET-WALLET-ADDRESS ONE-TOKEN-AMOUNT
// /send 0x742c4788CC47A94cf260abc474E2Fa45695a79Cd 42

/images vintage hot rod with custom flame paint job
// /memo (Send voice messages via microphone button on bottom right)

/qr s.country/ai astronaut, exuberant, anime girl, smile, sky, colorful
// ❤️‍🔥 [Join our team](https://xn--qv9h.s.country/p/dear-engineer-our-tech-lead-role) to build [AI ∩ Crypto](https://xn--qv9h.s.country/p/radically-fair-economy-for-1country)! [Product roadmap](https://xn--qv9h.s.country/p/generating-roadmap-as-ceo-vs-cto):

// [🧠 Web∞](https://xn--qv9h.s.country/p/learning-machine-cryptography): CivitAI custom models (low-rank adaptations, clothes & accessories, human poses, comics & brand characters, video-to-video transformations), Character.AI celebrity chats, RunwayML video clips, HuggingFace embedding ControlNet, Meta segment anything, ElevenLabs speech clones, Zapier task automations, document or website queries.

// [🌳 Web3](https://xn--qv9h.s.country/p/telegram-bots-and-clients-self-custody): self-custody wallets, token swaps, cross-chain bridges, fiat onramps, lending yields, collectible mints, price auctions, multi-signature safes, governance votes, portfolio management, .1 name services.

// [🐝 Web2](https://xn--qv9h.s.country/p/new-forum-for-ai-crypto-reddit-discourse): news curation, gated access, emoji tipping, collective moments, group discount, social commerce.

// [🏴‍☠️ Web1](https://xn--qv9h.s.country/p/controlnet-lora-1country-qr-code): .country domains, email aliases, vanity URLs, Notion/Substack hosting.
// `
// }
more: `/ explain like i am 5, what is a superconductor?
. explain like i have a phd, what is category theory?
/connect (Wallet Connect to MetaMask / Gnosis Safe / Timeless)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/open-ai/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Adjust image size or how many images are generated`,
endChat: 'Thanks for using 1.country services',
gptChatPaymentIssue: 'Once the withdrawal instructions are completed, you can return to the current conversation by writing the */ask* command.',
notEnoughBalance:
'Your credits: $CREDITS ONE tokens. To recharge, send to `$WALLET_ADDRESS`'
'Your credits: $CREDITS ONE tokens. To recharge, send ONE to `$WALLET_ADDRESS`'
}

// <b>Edit an Image</b>
Expand Down

0 comments on commit 78c9173

Please sign in to comment.