Git Product home page Git Product logo

gdgpisausermanager's People

Contributors

daquinoaldo avatar domenicoblanco avatar giobart avatar macisamuele avatar thymbahutymba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdgpisausermanager's Issues

Bot can't kick users

Thanks for reporting this issue with our bot ๐Ÿ˜โค๏ธ
Please fill-in the details and remove the useless sections

When you add a user:

2018-09-24 10:59:47,216 - ERROR - An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/telegram/ext/dispatcher.py", line 279, in process_update
    handler.handle_update(update, self)
  File "/usr/local/lib/python2.7/dist-packages/telegram/ext/messagehandler.py", line 169, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "gdgpisausermanager.py", line 44, in welcome
    threading.Timer(Config.WAITING_TIMEOUT, timer,
AttributeError: type object 'Config' has no attribute 'WAITING_TIMEOUT'

Stress Test

We should create a "test group" and try what happens if multiple users join at the same moment or with a few seconds of delay

The bot can't kick users

This is the log:
set 18 13:50:26 raspberrypi python[12935]: bot.kickChatMember(chatid, userid, until_date=25) set 18 13:50:26 raspberrypi python[12935]: File "/usr/local/lib/python2.7/dist-packages/telegram/bot.py", line 60, in decorator set 18 13:50:26 raspberrypi python[12935]: result = func(self, *args, **kwargs) set 18 13:50:26 raspberrypi python[12935]: File "/usr/local/lib/python2.7/dist-packages/telegram/bot.py", line 1428, in kick_chat_member set 18 13:50:26 raspberrypi python[12935]: result = self._request.post(url, data, timeout=timeout) set 18 13:50:26 raspberrypi python[12935]: File "/usr/local/lib/python2.7/dist-packages/telegram/utils/request.py", line 278, in post set 18 13:50:26 raspberrypi python[12935]: **urlopen_kwargs) set 18 13:50:26 raspberrypi python[12935]: File "/usr/local/lib/python2.7/dist-packages/telegram/utils/request.py", line 215, in _request_wrapper set 18 13:50:26 raspberrypi python[12935]: raise BadRequest(message) set 18 13:50:26 raspberrypi python[12935]: BadRequest: Peer_id_invalid``

Users kicked out after registration

Expected Behavior

If the users the first time doesen't complete the registration, when someone add the member again and he/she complete the registration everything should be fine

Actual Behavior

when the user complete the registration the second time, he/she get banned

Steps to Reproduce the Problem

  1. add the member to the group and don't complete the registration
  2. when the user get kicked, add it again to the group
  3. this time complete the user registration
  4. after the timer the user get kicked out

Specifications

  • Python: 3.7
  • Operating System: raspbian

The python package cannot read the config file

I suppose that depends on the last commit

Expected Behavior

Running the bot it should load config.py, that search for the .telegram.token file. If the file does not exist it should suggest where to put it.

Actual Behavior

ModuleNotFoundError: No module named 'config'. Installing as a module it copy only the gdgpisausermanager.py file, so config.py is unreachable.

Steps to Reproduce the Problem

Just follow the README.md instruction to install the bot.

Specifications

  • Python: v 3.7
  • Operating System: Windows 10 build 1803, Ubuntu server 18.04.1 LTS

CI/CD pipeline

To be discussed.
A CI that builds the docker image and publishes it on the Docker Hub can be useful.

Since the project is open source, can be implemented for free using Travis-CI, that is a simple but powerful tool that anyone should understand.

Missing tests

There are some tools that simulate the Telegram server and sends programmatically fake requests to our bot.

Should be tested:

  • all the code, possibly with ~100% coverage
  • usernames and nicknames with strange characters (UTF-16, emoji, etc.)
  • stress test: two users come consequently, the bot should show 2 different buttons, one for each user, and other things like that.

Related: Stress Test #3

Missing translations

Simply there are no translation. I think is not so urgent but it could be useful for other groups.

Logger

Thanks for reporting this issue with our bot ๐Ÿ˜โค๏ธ
Please fill-in the details and remove the useless sections

Expected Behavior

We should create an appropriate output log

Actual Behavior

The bot prints everything inside the Terminal window

Steps to Reproduce the Problem

  1. Run the bot

Screenshot

If possible provide a screenshot of the problem.

Specifications

  • Python: Python & version
  • Operating System: Windows, Mac, Linux

Update README

As the title says, we should update the README file with better infos

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.