{"id":16824330,"url":"https://github.com/dlion/smagenbot","last_synced_at":"2025-04-11T03:14:51.547Z","repository":{"id":34162963,"uuid":"38006657","full_name":"dlion/smagenBot","owner":"dlion","description":"A simple personal Telegram bot plugins based.","archived":false,"fork":false,"pushed_at":"2016-02-10T23:54:29.000Z","size":35,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T03:14:46.565Z","etag":null,"topics":["bot","node","nodejs","smagen","telegram"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-24T19:36:28.000Z","updated_at":"2023-11-07T12:40:00.000Z","dependencies_parsed_at":"2022-08-28T20:52:24.373Z","dependency_job_id":null,"html_url":"https://github.com/dlion/smagenBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlion%2FsmagenBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlion%2FsmagenBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlion%2FsmagenBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlion%2FsmagenBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlion","download_url":"https://codeload.github.com/dlion/smagenBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333594,"owners_count":21086200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","node","nodejs","smagen","telegram"],"created_at":"2024-10-13T11:10:45.430Z","updated_at":"2025-04-11T03:14:51.527Z","avatar_url":"https://github.com/dlion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smagenBot\nA simple personal Telegram bot plugins based.\n\n## How can I create a personal bot ?\nFollow these steps: https://core.telegram.org/bots#3-how-do-i-create-a-bot\n\n## Configure smagenBot\nEdit config.json\n```\ntoken: \"YOUR BOT TOKEN\",\ninterval: \"everytime it has to check messages\"\nquiet: true if you want to know when it send a message, false if not\nusername: false allows your bot to send messages to everyone otherwise put it your username and it will send messages only to you\nbotname: Your bot nick\n```\n\n## List of Plugins\nTo see a list of plugins send `/help` to your bot or list files in `plugins/` directory\n\nCurrently I have made these plugins:\n* `/os` - Send to me my OS information\n* `/pokemon \u003cname\u003e` - Send to me informations about `\u003cname\u003e` pokémon\n* `/expand \u003curl\u003e` - Expand a short `\u003curl\u003e`\n* `/btc \u003ccurrency\u003e` - Show quotation of Bitcoin in `\u003ccurrency\u003e`\n* `/imdb \u003cfilm\u003e` - Show information about a `\u003cfilm\u003e`\n* `/xkcd \u003cid\u003e or \u003crandom\u003e` - Send an image from xkcd\n\n## Add a Plugin\n* To add a simple plugin you have to add `name.js` file to a `plugins/` directory.\n* Follow the examples to make your own plugin.\n* Add your plugin command and description to a `list.json` file\n\nThat's all.\n\nTo use it send to your bot `/name`.\n\n## How plugins works\nPlugins have to put into an `exec` function that have one parameter and returns a callback with 2 parameters:\n* The first parameter is an array of objects\n* The second parameter is an array of strings. These strings coincide to type of the objects returns.\n\nSo if for example: if the first object is a text object the first element of the type's array is `\"text\"`, if the second is a photo object the second element of the type's array is `\"photo\"` and so on.\n\n## Screenshot\n![screen1](http://i.imgur.com/ZM2MzKa.png)\n\n## Log Example\n```\n{\"level\":\"info\",\"message\":\"Text Sent to \u003c?chat_id=-2572583\u003e.\",\"timestamp\":\"2016-01-21T14:27:42.668Z\"}\n```\n\n## TODO\n- [ ] Start plugin\n- [x] Move plugins directory on the root of the repo\n- [ ] More plugins\n- [x] if use /command@nickname your bot answer only if nickname is his name\n- [x] The bot can send images from an url\n- [x] The bot can send chatAction\n- [ ] The bot can send audio files\n- [x] The bot can send videos from an url\n- [x] The bot can send documents from an url\n- [x] Plugins can send more messages at once (photo, text, etc.)\n\n## Author\n* Domenico Luciani aka DLion\n* http://dlion.it\n\n## LICENSE\nMIT 2015 Domenico Luciani domenicoleoneluciani@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlion%2Fsmagenbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlion%2Fsmagenbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlion%2Fsmagenbot/lists"}