@@ -69,29 +69,17 @@ public TelegramResponse handleRequest(long chatId, String text) {
69
69
switch (command ){
70
70
case "/start" :
71
71
responseText = "Thanks for joining ...\n " +
72
- "I am a disposable bot email id generator that can:\n " +
72
+ "I am a *disposable email* id generator bot that " +
73
+ "can:\n " +
73
74
"1. Quickly generate a disposable email for you," +
74
75
" no email management hassle \uD83D \uDE0B \t \n " +
75
- "2. Quickly delete those emailIds\n " +
76
- "3. Since I own, " +
77
- "*trashemail.in*, *humblemail.com* & *thromail.com* " +
78
- "your emailId will belong these domains\n " +
79
- "4. I dont read anything, I respect your privacy." +
80
- "Any doubt? Audit my source code." +
81
- "\n \n " +
82
- "I am still a baby and learning.\n " +
83
- "Do you have idea for addon? " +
84
- "Please feel free to reach @" +
85
- " https://github.com/r0hi7/Trashemail" +
86
- " and raise an issue. " +
87
- "I will definitely work out on that" +
88
- "\n \n " +
76
+ "2. Quickly delete those email addresses\n " +
77
+
89
78
"For now to get started try\n " +
90
- "* /create <user>@(" +
91
- String .join ("|" , emailServerConfig .getHosts ()) +")\n " +
92
- "* /delete emailId\n " +
79
+ "* /create <user>\n " +
80
+ "* /delete\n " +
93
81
"* /help\n " +
94
- "* /emails \n " ;
82
+ "* /list_ids \n " ;
95
83
96
84
return new TelegramResponse (
97
85
chatId ,
@@ -279,25 +267,24 @@ else if(argument == null) {
279
267
responseText = "Create disposable email addresses to " +
280
268
"protect you against spam and newsletters." +
281
269
"E-Mail forwarding made easy.\n " +
282
- "I am open source and runs on open source services." +
283
- "You can find my heart, soul and brain at:" +
284
- " https://github.com/r0hi7/Trashemail\n \n " +
270
+ "I am open source and runs on open source services.\n " +
271
+
285
272
"Currently, I support:\n " +
286
273
"/create - That can get you one(or more) " +
287
274
"custom disposable emails.\n " +
288
275
"/delete - If you are getting spams for any mail id, " +
289
276
"just delete it because it is disposable.\n " +
290
- "/emails - Get the list of all the emailIds " +
277
+ "/list_ids - Get the list of all the email Ids " +
291
278
"that belongs to you.\n " +
292
279
"/help - this help message.\n " ;
293
280
return new TelegramResponse (
294
281
chatId ,
295
282
responseText
296
283
);
297
284
298
- case "/emails " :
299
- String response = "Currently, you have below mentioned " +
300
- "emails with you.\n * " ;
285
+ case "/list_ids " :
286
+ String response = "Currently, you have these email ids with " +
287
+ "you. \n " ;
301
288
List <User > allEmailsWithUser =
302
289
userRepository .findByChatIdAndIsActiveTrue (
303
290
chatId );
@@ -306,7 +293,6 @@ else if(argument == null) {
306
293
response += emailWithUser + "\n " ;
307
294
}
308
295
309
- response +="*" ;
310
296
return new TelegramResponse (
311
297
chatId ,
312
298
response
@@ -405,13 +391,49 @@ else if(argument == null) {
405
391
406
392
break ;
407
393
394
+ case "/follow" :
395
+ String follow_response = "Follow me on: \n " +
396
+ "Twitter : https://twitter.com/sehgal_rohit" +
397
+ "GitHub : https://github.com/r0hi7" ;
398
+
399
+ return new TelegramResponse (
400
+ chatId ,
401
+ follow_response
402
+ );
403
+
404
+ case "/sponsor" :
405
+ String sponsor_response = "Average running cost of this " +
406
+ "per-month is $30, if you like the idea and would " +
407
+ "like to sponsor then you can buy me a " +
408
+ "coffee: https://www.buymeacoffee.com/r0hi7" ;
409
+ return new TelegramResponse (
410
+ chatId ,
411
+ sponsor_response
412
+ );
413
+
414
+ case "/like" :
415
+ String like_response = "*If* you like the idea and this " +
416
+ "product, do drop a star at github repo (where my " +
417
+ "hear and soul lives).\n Every star " +
418
+ "really " +
419
+ "motivates me :)\n " +
420
+ "https://github.com/TrashEmail/TrashEmail" ;
421
+ return new TelegramResponse (
422
+ chatId ,
423
+ like_response
424
+ );
425
+
408
426
default :
409
- responseText = "I dont understand that ...\n " +
427
+ responseText = "I don't understand that ...\n " +
410
428
"I only understand few commands.\n " +
411
429
"1. /create <user>\n " +
412
430
"2. /delete\n " +
413
431
"3. /help\n " +
414
- "4. /emails\n " ;
432
+ "4. /list_ids\n " +
433
+ "5. /follow\n " +
434
+ "6. /like\n " +
435
+ "7. /sponsor" ;
436
+
415
437
return new TelegramResponse (
416
438
chatId ,
417
439
responseText
0 commit comments