Code Monkey home page Code Monkey logo

support-bot's Introduction

Support-Bot

Assistant bot for the PHP Telegram Bot Support group.

Commands

  • /help: A short description of the bot and a list of all available commands.
  • /id: Display the user and chat information. Also, try forwarding any message from a channel to display the channel information.
  • /rules: Show the rules that apply in the support group.
  • /donate: Donate to the project using Telegram Payments.

support-bot's People

Contributors

daniel-lucio avatar dependabot[bot] avatar hitmare avatar jacklul avatar noplanman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

support-bot's Issues

/faq

Command to display FAQ entry links (and possibly content itself) from the main library's FAQ wiki page.

This can be displayed either as separate messages or as an integrated inline message, using inline keyboards for navigation.

Also, it would be helpful to allow a simple search functionality:
/faq mysql, /faq commands, etc.

FAQ entries would be fetched and parsed either via cron or GitHub webhook and then saved in the DB to cache results, preventing unnecessary requests to GitHub and speeding up the process.

Note: It will be important to keep the FAQ page 100% parsable at all times, as this command would fail otherwise.

Sanitize first name in welcome message

It seems like htmlentities is breaking for some people's names, maybe filter_var($new_user->getFirstName(), FILTER_SANITIZE_SPECIAL_CHARS) would be better? Anyone with experience in this?

Welcome messages not getting deleted

Seems like the welcome message deletion isn't working properly.

Probably makes sense to keep an array of welcome message IDs, in case a deletion doesn't work for whatever reason. Then every new member joining would trigger the deletion of all IDs in the array.

/link "name"

The /link command allows admins to easily save and post important links that contain great information, allowing it to be shared easily.
e.g. Direct link to the README file, a great article online explaining bots, etc.

Administration is done through the command itself:
e.g.

  • /link add readme https://link.to/readme.md
  • /link update readme https://new.link.to/readme.md
  • /link delete readme

Just sending /link could open a list of all available links for easy access.
e.g.

$ /list
readme: https://link.to/readme.md
bots-explained: https://online.article/about/bots

Old welcome message deletion not reliable

The deletion of old welcome messages doesn't always work and invalid IDs stay stuck in the DB. Must figure out why this is happening and improve the cleanup procedure.

Posts release messages twice

This is due to GitHub sending 2 different release events when a new release is made:

  • "action": "created"
  • "action": "published"

We should only send a message on published

Prevent welcome message flood

Instead of just sending a welcome message each time a user joins, best only send one if the previous message wasn't already a welcome message.
Or, maybe just a much shorter one?

Also, we could delete the "User joined the group" status message.

What do you guys think?

@php-telegram-bot/developers @Hitmare @chuv1

Permissions get removed when joining the group a 2nd time

When a User, who already had permission to send Messages, leaves the group and joins it again, they get their permissions removed.
The Bot does not give them the Button to accept the Rules anymore when issuing the Rules command, hence they dont get the permissions to send a Message again

Request Env Example

hi can share new example dot env file ?

i cant use env example on this repository because cannot read variable on .env file

PHP file

require_once __DIR__ . '/vendor/autoload.php';
Dotenv::createUnsafeImmutable(__DIR__)->load();

$logging_paths['LOG_DIR'] = getenv('TG_LOGS_DIR');

print_r($logging_paths);

Response
array(1) { ["LOG_DIR"]=> string(19) "${TG_BASE_DIR}/logs" }

auto-kick other bots

We shouldn't allow other bots in support-channel, therefore wer should auto-kick every joining user with bot in username. Before kick we could send a message in channel that bots are not allowed, if someone really has bot in name but isn't a bot, we could send some username to the user like "if you aren't a bot, write @UserXY to get unbanned.

so we need a command to add the user to whitelist =)

Ephemeral messages

Add the ability to create self-destructing messages, which can be used in different scenarios:

  • Let new users know that they must agree to the rules within X minutes.
  • Let users know about private-only commands when they try to execute them in the group (like /rules, /id or /donate)

Set up donations via Telegram Payments

Add a command (and possibly inline keyboard button for new version releases) to take advantage of Telegram Payments and allow users to donate directly.

Main commands

This is a general issue to discuss the core commands of the support bot. For more specific details and discussion is necessary, a separate issue should be created for each command.

As this is totally a work-in-progress, new suggestions and ideas are more than welcome! ๐Ÿ˜‡

Here a list of suggested commands so far:

  • /ask: "Don't ask to ask, just ask"
  • /wiki: Link to Wiki
  • /latest: Latest Version with Link?
  • /issue: "Please open an Issue for this: $link"
  • /allsupporters (admin): Tags all Supporters in Group and request help/info
  • /link "name": Add custom shortcut link (e.g. to a wiki page, a web article, etc.)
  • /faq: Command to navigate the FAQ

And some passive bot chores:

  • Allow linking to GitHub issues / PRs for the core library.
    gh#123 -> https://github.com/akalongman/php-telegram-bot/(issues|pulls)/123
  • Send automatic notification on new release (with changelog even?) via GitHub webhook.

Approval Survey for new Users

I'll start this issue to collect and discuss ideas for a Approval Survey for new Users , so we can sort out some of the non bot library questions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.