GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NullDev/Static-Post-Bot: Telegram Bot for making posts to a static website

BranchesTags
Open more actions menu

Latest commit

 

History

38 Commits
38 Commits

Folders and files

NameName
Last commit message
Last commit date
.img
.img
 
 
public_html
public_html
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bot.js
bot.js
 
 
config.json
config.json
 
 
package.json
package.json
 
 
userdata
userdata
 
 

Repository files navigation

Static Post Bot


Telegram Bot for making posts to a static website


This was rather an test project for DOM Manipulation from NodeJS.
Not suitable for production/deployment.

How it works and what it does:

If you send the bot a message and you have permission to perform actions, you will be prompted with a menu where you can

  • Create a new post
  • List existing posts
  • Delete a post
  • Edit a post

Once an option is clicked, just follow the instructions of the bot.

Posts consist of an image and a text.
The pictures can be enlarged on click.

Here is a live demo to see what it looks like:

https://nulldev.github.io/Static-Post-Bot/public_html/

Additional Features

  • Custom messages (set in config)
  • Markdown support
  • Check user permission
  • Send message with choice buttons instead of slash commands
  • Check if the input is valid text (no picture or sticker)
  • check if the picture is valid and not text or sticker
  • Pictures can be applied by sending them or by providing an URL to them
  • Check if the URL to the picture is valid
  • Check if the picture has a valid extension (.png, .gif, .jpg...)
  • Valid extensions can be set in the config
  • Local session storage. The process of creating a post can be continued later
  • Allowed users can be set in config
  • markdown can be disabled in config
  • Bot key can be set in config
  • Inline parsing of HTML file
  • All actions are cancelable
  • Path to HTML file can be set in config
  • jQuery support
  • Automaticly keep the order of posts in the HTML file if one is deleted

Install instructions:

//TODO

Config:

The config is rather self explaining.
It can be found here.

Option Explanation
telegram_token Your Telegram-Bot API Key/Token
admins Array of User ID's who are allowed to use the bot
path_to_html Path to the HTML file where the posts will be applied to
allowed_image_types Array of supported file extenson for images
markdown Should all messages parsed as markdown? (E.g. Parse *text* as text)
everything after markdown All other config entries are just the messages the bot sends. They can be customized.

Thats it pretty much 😸

Screenshots

(click the pictures for full size)

About

📡 Telegram Bot for making posts to a static website

Topics

domdom-manipulationnodejsnulldevpoststatic-sitetelegramtelegram-bot

Resources

Readme
Apache-2.0 license
Activity

Stars

7 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.