Git Product home page Git Product logo

Comments (4)

x23piracy avatar x23piracy commented on June 3, 2024

Hi,

i am playing around with letting the bot post lists and tell the user to send a command to select a list entry.
Maybe this is something for the group admin views, it should made safe that no wrong messages will been send and avoid blocking.

But we need a group member listing --> #39

I did the following to rate users (i use the bot for soccer management)

def rate(self, message=None, match=None, to=None):
    if message.isGroupMessage() == True:
        return TextMessageProtocolEntity("Die Spielerbewertung ist in der Gruppe nicht erlaubt, bitte durch Direktkonversation bewerten.", to=message.getFrom())
    else:
        if len(message.getBody()) == 7:
            try:
                float(int(message.getBody()[6:]))
            except ValueError:
                return TextMessageProtocolEntity("Es sollten schon eine Zahl zwischen 0 und 6 sein Dumbo!", to=message.getFrom())
            if os.path.exists(rank + message.getFrom()):
                for filename in os.listdir(user):
                    if not os.path.exists(rank + message.getFrom() + "/" + filename):
                        spielername = open(user + filename, "r")
                        text_file = open(rank + message.getFrom() + "/" + filename, "w")
                        text_file.write(message.getBody()[6:])
                        text_file.close()
                        return TextMessageProtocolEntity("Du hast " + spielername.read() + " mit " + message.getBody()[6:] + " Punkte(n) bewertet. Sende /rate für die nächste Bewertung.", to=message.getFrom())
        else:
            if os.path.exists(rank + message.getFrom()):
                for filename in os.listdir(user):
                    if not os.path.exists(rank + message.getFrom() + "/" + filename):
                        spielername = open(user + filename, "r")
                        return TextMessageProtocolEntity("Sende /rate (0..6) um " + spielername.read() + " zu bewerten.\r\n\r\n/rate 0 keine Wertung\r\n/rate 1 sehr gut\r\n/rate 2 gut\r\n/rate 3 befriedigend\r\n/rate 4 ausreichend\r\n/rate 5 mangelhaft\r\n/rate 6 ungenügend", to=message.getFrom())

Regards

from whatsapp-bot-seed.

x23piracy avatar x23piracy commented on June 3, 2024

Hi,

any news here?

Regards X23

from whatsapp-bot-seed.

lutekdev avatar lutekdev commented on June 3, 2024

@joaoricardo000 joão ricardo 000 I can not install this bot can help me please need urgently my company is in need of a bot like yours please help me

from whatsapp-bot-seed.

abdhan avatar abdhan commented on June 3, 2024

from whatsapp-bot-seed.

Related Issues (20)

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.