- Notifications
You must be signed in to change notification settings - Fork3
Interact with your Oh Dear! sites chatting with this bot.
Lloople/bot-mr-dear
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
I'm here to help you manage your sites onOh Dear! App by chat. Also I can text you if something is going wrong (Let's hope it'll be no need to 😉)
/sites
- I'll show you a list with your current sites and their most recent status result./newsite {url}
- We will begin a delightful conversation in order to add a new site to your collection./deletesite {url or id}
- I get it, you don't want to see that site anymore, but first we will confirm you really want to do this./site {url or id}
- I'll be glad to show you all the information regarding to a specific site./downtime {url or id}
- Let's see how many times your site was down for the last month./uptime {url or id}
- I'll tell you the percentage your site was up on the last month./brokenlinks {url or id}
- Check out your website's broken links in a second./mixedcontent {url or id}
- Check out your website's mixed content.
Since the moment you ask me about your sites (/sites
) I'll show you the name of your sites along withan indicator to see quickly if it's online (✅ or 🔴) in form of a button. You can click it to see moreinformation about your site and another group of buttons to check other common actions like Broken Links,Downtime, etc...
During the/start
process, the bot will ask you for your API token in order to interact with your sites, but alsoyourwebhook signing secret
. This information can be found at the end of theNotifications page.
With this key configured, the bot can warn you if there's any problem with your site. Currently notifications supported are:
- Uptime Check Failed
- Broken Links Found
This bot is currently functional atMrDear_bot on Telegram, so you don't have to do anything toget up and running.
However, there's a chance you want to host it yourself. If that's your case, just follow the few steps described below.
composer installphp artisan migratecp .env.example .env
After that, you will need tocreate your own Telegram Bot.
Once you have obtained the access token, place it in your.env
file likeTELEGRAM_TOKEN=token
.
Telegram needs to send the incoming messages to your bot. In order to configure that, you can use the following command
php artisan botman:telegram:register
The default url will beyourdomain.com/botman
. It must beHTTPS
If you're developing in a local environment, take in mind usingLaravel Valet feature
valet share
. It uses ngrokunder the hood to make your project accessible from the outside.
That's it. You can now talk to your bot through Telegram.
If your is not running as you've expected you have a few tools to help you see what's going on:
- If you're using
valet share
for local development you already have a custom dashboard to check incoming requests athttp://127.0.0.1:4040 by ngrok. - To see the full error, check the
storage/logs/laravel.log
file. Take in mind that Telegram re-sends a failed request up to 4 more times. - To debug the application, you can useBeyond Code package called
laravel-dump-server
. It's already installedin this project, you just need to runphp artisan dump-server
and put somedump($var)
in your code to see it in the terminal.
If you discover a security vulnerability within this bot, please send an e-mail to David Llop atd.lloople@icloud.com. All security vulnerabilities will be promptly addressed.
Mr. Dear is free software distributed under the terms of the MIT license.