payamqorbanpour / dejir Goto Github PK
View Code? Open in Web Editor NEWA telegram bot to collect spam and ham.
A telegram bot to collect spam and ham.
What would happen if user send /command when he is in the middle of another conversation (e.i. sending a spam/ham message)?
Current situation: The /command would be saved in the database as spam/ham.
Preferred situation: The process would be canceled and the /command will run.
یه هندل اضافه شه که کاربر بتونه پیامهایی که قبلن فرستاده رو یا حداقل تعدادشون رو ببینه.
چطور میشه اگر متن ها رو یه جای مجزا نگهداری کنیم که فایل(ها) اصلی شلوغ نشن؟
۱. پیامهایی که میبینه باید اصلاح بشه. توضیحات اولیه و راهنمایی هرجایی که لازمشه.
۲. موقعی که یه پیام ثبت میکنه، بتونه انتخاب کنه که دوباره پیام ثبت کنه.
شاید اگر اون پیام خوش آمد گویی یه عکس قشنگ و چشمنواز بهش الصاق شده باشه حس بهتری به کاربر بده.
لزومی نداره عکس خفنی هم باشه. حس خوبش مهمتره.
به پیام های دیگه هم شاید بشه یه چیزی اضافه کرد!؟!
اما سوال اینه:
چطور میشه عکس چسبوند به متن؟
نیاز داریم یه چارچوب کلی برای تست تعریف کنیم.
یه سری حالتهای خاص یا غیرعادی یا نادرست رو باید رسیدگی کنیم.
مثلن من اگر الان بزنم ثبت اسپم، بعدش دوباره یه هندل دیگه رو بزنم، خود هندل دوم رو به عنوان پیام ذخیره میکنه.
این که عمدهی چیزها توی یه فایل جمع شدن شاید جالب نباشه.
الان از ۱۰۰ خط رد شده.
در آینده بیشتر هم میشه
چطور میشه تقسیمش کرد به چندتا فایل کوچکتر که توسعه و نگهداری بی دردسرتری داشته باشیم؟
مثلن ارتباط با پایگاه داده ها همه یک فایل بشن
قسمت مربوط به ثبت پیام یک فایل بشه
قسمت مربوط به بررسی پیام یک فایل بشه
یا هر منطق مناسب دیگهای
نیازی نیست که شناسه/نام کاربری کسی که پیامک اهدا کرده ذخیره بشه.
برای اینکار، شناسه رو به صورت هش شده میشه نگهداری کرد.
اینطوری میشه تشخیص داد که کدوم پیامها فرستنده یکسانی دارن. اما معلوم نیست این فرستنده دقیقا چه کسیه.
توضیحات مربوط به:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.