├── Procfile ├── Maintainance-Bot.png ├── ss ├── IMG_20210702_124150.jpg └── IMG_20210702_124342.jpg ├── go.mod ├── go.sum ├── .gitignore ├── LICENSE ├── app.json ├── app.go └── README.md /Procfile: -------------------------------------------------------------------------------- 1 | worker: bin/GoMaintainanceBot 2 | -------------------------------------------------------------------------------- /Maintainance-Bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkkilMG/GoMaintainanceBot/HEAD/Maintainance-Bot.png -------------------------------------------------------------------------------- /ss/IMG_20210702_124150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkkilMG/GoMaintainanceBot/HEAD/ss/IMG_20210702_124150.jpg -------------------------------------------------------------------------------- /ss/IMG_20210702_124342.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkkilMG/GoMaintainanceBot/HEAD/ss/IMG_20210702_124342.jpg -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/HeimanPictures/GoMaintainanceBot 2 | 3 | // +heroku goVersion go1.15 4 | go 1.15 5 | 6 | require github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-beta10 7 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-beta9 h1:cbh78t+DIWGdyZYg4AZprJexYp7LwBruww1UHEgzjMQ= 2 | github.com/PaulSonOfLars/gotgbot/v2 v2.0.0-beta9/go.mod h1:r815fYWTudnU9JhtsJAxUtuV7QrSgKpChJkfTSMFpfg= 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 HEIMAN PICTURES 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Maintainance Bot", 3 | "description": "telegram's bot", 4 | "logo": "https://github.com/HeimanPictures/Go-Maintainance-Bot/", 5 | "keywords": [ 6 | "tool", 7 | "maintainance", 8 | "telegram", 9 | "bot" 10 | ], 11 | "repository": "https://github.com/HeimanPictures/Go-Maintainance-Bot", 12 | "website": "https://github.com/HeimanPictures/Go-Maintainance-Bot", 13 | "success_url": "https://t.me/HeimanSupports/", 14 | "env": { 15 | "BOT_TOKEN": { 16 | "description": "Get this value as String from @BotFather in telegram" 17 | }, 18 | "START_TEXT": { 19 | "description": "Dude Just Prove me text, but Remember not to add Hello... As I Have Added 'Hello ' in the chat" 20 | }, 21 | "FILTER_TEXT": { 22 | "description": "Dude Just Prove me text, but Remember not to add Hello... As I Have Added 'Hello ' in the chat" 23 | }, 24 | "SUPPORT_GROUP": { 25 | "description": "Example https://t.me/HeimanSupport/" 26 | }, 27 | "UPDATE_CHANNEL": { 28 | "description": "Example https://t.me/HeimanSupports/" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 HeimanPictures 2 | 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program. If not, see . 15 | 16 | 17 | package main 18 | 19 | import ( 20 | "fmt" 21 | "net/http" 22 | "os" 23 | 24 | "github.com/PaulSonOfLars/gotgbot/v2" 25 | "github.com/PaulSonOfLars/gotgbot/v2/ext" 26 | "github.com/PaulSonOfLars/gotgbot/v2/ext/handlers" 27 | "github.com/PaulSonOfLars/gotgbot/v2/ext/handlers/filters" 28 | ) 29 | 30 | var UPDATE_CHANNEL = os.Getenv("UPDATE_CHANNEL") 31 | 32 | var SUPPORT_GROUP = os.Getenv("SUPPORT_GROUP") 33 | 34 | var START_TEXT = os.Getenv("START_TEXT") 35 | 36 | var FILTER_TEXT = os.Getenv("FILTER_TEXT") 37 | 38 | func main() { 39 | b, err := gotgbot.NewBot((os.Getenv("BOT_TOKEN")), &gotgbot.BotOpts{ 40 | Client: http.Client{}, 41 | GetTimeout: gotgbot.DefaultGetTimeout, 42 | PostTimeout: gotgbot.DefaultPostTimeout, 43 | }) 44 | if err != nil { 45 | panic("failed to create new bot: " + err.Error()) 46 | } 47 | 48 | updater := ext.NewUpdater(nil) 49 | dispatcher := updater.Dispatcher 50 | 51 | dispatcher.AddHandler(handlers.NewCommand("start", start)) 52 | dispatcher.AddHandler(handlers.NewMessage(filters.All, all)) 53 | err = updater.StartPolling(b, &ext.PollingOpts{DropPendingUpdates: true}) 54 | if err != nil { 55 | panic("failed to start polling: " + err.Error()) 56 | } 57 | fmt.Printf("%s has been started...\n", b.User.Username) 58 | 59 | updater.Idle() 60 | } 61 | 62 | func start(b *gotgbot.Bot, ctx *ext.Context) error { 63 | _, err := ctx.EffectiveMessage.Reply(b, fmt.Sprintf("Hello, I'm @%s.\n"+START_TEXT, b.User.Username), &gotgbot.SendMessageOpts{ 64 | ParseMode: "html", 65 | ReplyMarkup: gotgbot.InlineKeyboardMarkup{ 66 | InlineKeyboard: [][]gotgbot.InlineKeyboardButton{{ 67 | {Text: "UPDATE CHANNEL", Url: UPDATE_CHANNEL}, 68 | {Text: "SUPPORT GROUP", Url: SUPPORT_GROUP}, 69 | }}, 70 | }, 71 | }) 72 | if err != nil { 73 | fmt.Println("failed to send /start: " + err.Error()) 74 | } 75 | return nil 76 | } 77 | 78 | func all(b *gotgbot.Bot, ctx *ext.Context) error { 79 | _, err := ctx.EffectiveMessage.Reply(b, fmt.Sprintf("Hello, I'm @%s. \n"+FILTER_TEXT, b.User.Username), &gotgbot.SendMessageOpts{ 80 | ParseMode: "html", 81 | ReplyMarkup: gotgbot.InlineKeyboardMarkup{ 82 | InlineKeyboard: [][]gotgbot.InlineKeyboardButton{{ 83 | {Text: "SUPPORT GROUP", Url: SUPPORT_GROUP}, 84 | }}, 85 | }, 86 | }) 87 | if err != nil { 88 | fmt.Println("failed to set all filter: " + err.Error()) 89 | } 90 | return nil 91 | } 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Maintenance Bot

2 |

3 | 4 | Cover Image 5 | 6 |

7 | 8 | 9 |

10 | A Telegram Repo For Bots Under Maintenance Which Gives Faster Response To Users 11 |
12 | Requests » 13 |
14 | Report a Bug 15 | | 16 | Request Feature 17 |

18 |

19 | 20 |
21 | 22 |
23 | Table of Contents 24 |
    25 |
  1. 26 | About this Bot 27 |
  2. 28 |
  3. 29 | How to make your own 30 | 33 |
  4. 34 | 37 |
  5. Credits
  6. 38 |
39 |
40 | 41 | 42 | ## About This Bot 43 | 44 |

45 | 46 | Telegram Logo 47 | 48 |

49 |

50 | This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response writen in Go Using GoTGBot Framework.. 51 |

52 | 53 | 54 | ## How to make your own 55 | 56 | Either you could locally host or deploy on [Heroku](https://heroku.com) 57 | 58 | ### Deploy on Heroku 59 | 60 | Press the below button to Fast deploy on Heroku 61 | 62 | [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/HeimanPictures/GoMaintainanceBot/tree/master/) 63 | 64 | then goto the variables tab for more info on setting up environmental variables. 65 | 66 | 67 | Cover Image 68 | 69 | 70 | An example of `.env` file: 71 | 72 | ```sh 73 | BOT_TOKEN=12345678:yourtbottokenhere 74 | UPDATE_CHANNEL=https://t.me/HeimanSupports 75 | SUPPORT_GROUP=https://t.me/HeimanSupport 76 | START_TEXT=Hello @heimancreatiinbot, 77 | HELP_TEXT=Hello @heimancreatiin, 78 | ``` 79 | 80 | ### Mandatory Vars 81 | 82 | `BOT_TOKEN` : Get the bot token from [@BotFather](https://telegram.dog/BotFather) 83 | 84 | `UPDATE_CHANNEL` : Your Telegram Channel Link 85 | 86 | `SUPPORT_GROUP` : Your Telegram Support Group Link 87 | 88 | `START_TEXT` : Dude Just Prove me text, but Remember not to add Hello... As I Have Added 'Hello ' in the chat 89 | 90 | `FILTER_TEXT` : Dude Just Prove me text, but Remember not to add Hello... As I Have Added 'Hello ' in the chat 91 | 92 | 93 | Cover Image 94 | 95 | 96 | 97 | ## Credits 98 | 99 | - Thanks To [Paul Larsen](https://github.com/PaulSonOfLars/) For [GoTGBot](https://github.com/PaulSonOfLars/gotgbot/v2) 100 | - Logo By [poppit](https://telegram.dog/poppit/) 101 | - Thanks To [Heiman Creation](https://github.com/HeimanPictures/)([Me](https://telegram.dog/HeimanCreation/)) 102 | - Thanks To [Veer Ser](https://github.com/anonyindian) Helping Me With Errors 103 | ## LICENSE 104 | 105 | ``` 106 | Copyright (C) 2021 HeimanPictures 107 | 108 | This program is free software: you can redistribute it and/or modify 109 | it under the terms of the GNU General Public License as published by 110 | the Free Software Foundation, either version 3 of the License, or 111 | (at your option) any later version. 112 | 113 | This program is distributed in the hope that it will be useful, 114 | but WITHOUT ANY WARRANTY; without even the implied warranty of 115 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 116 | GNU General Public License for more details. 117 | 118 | You should have received a copy of the GNU General Public License 119 | along with this program. If not, see . 120 | ``` 121 | --------------------------------------------------------------------------------