Code Monkey home page Code Monkey logo

rsvpbot's People

Contributors

alexandrinaw avatar bgilbert avatar ifo avatar jjst avatar karamcnair avatar katee avatar meereeum avatar mrdrozdov avatar munyari avatar pnasrat avatar porterjamesj avatar vakila avatar wtfcarlos avatar zeusdeux 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

Watchers

 avatar  avatar  avatar

rsvpbot's Issues

Limit cutoff

When one has a list of npeople who rsvp yes'd, and then you set the limit to m where m < n, there's no way of handling that scenario and the people just stay there.

Doesn't work in opt-in streams

Someone recently made an event in the politics stream, which is opt-in. RSVPbot doesn't seem to have picked this up - there should be some way to ask RSVPbot to join another stream. Or maybe it should just subscribe to everything.

Add "rsvp reinit"

When setting up the next instance of a recurring event, a common idiom is rsvp cancel + rsvp init. Maybe there could be an rsvp reinit command that does both?

See your agenda

You should be able to PM rsvp bot to get your current agenda

parse dates more flexibly

It'd be great if RSVPBot would use something like dateparser to accept dates in a variety of formats.

I think if you use settings={'PREFER_DATES_FROM': 'future'}, it'll even do the right thing if someone just sets the date to a string like "Tuesday".

Also maybe you can allow the time to be optionally set in the same command as the date, this way. I'm hoping input like "Tuesday at 2pm" works, but I haven't tested it.

`rsvp move` doesn't handle percent-encoded slashes in URLs

rsvp move https://recurse.zulipchat.com/#narrow/stream/RSVPs/topic/Security.20club.3A.20HTTPS.20pt.2E.201.2Foperational.20security resulted in the event being moved to Security club: HTTPS pt. 1 instead of Security club: HTTPS pt. 1/operational security

Support the use of a separate dedicated stream for RSVP events

People are now using a dedicated RSVPs stream to reduce the noise caused by people rsvp'ing.

I was thinking we could support this workflow in RSVPBot directly by re-purposing the init command so that if it's ran outside of the RSVPs stream, then it creates a new topic in the RSVPs stream matching the original topic name, and posts a link to the RSVP thread in the original thread.

Thoughts?

(The use of a separate dedicated thread for RSVP events is pretty new, so I'm sure there's lots of kinks we still need to figure out with that new use case)

Multicalendar support

Not all events happen on one place. We need a way for RSVPBot to create events in arbitrary calendars

Moving event from PM to public stream crashes RSVPBot

I was playing around with RSVPBot locally trying to learn about how it works when you PM it and found a way to crash the bot.

Steps to reproduce:

  1. rsvp init in a PM with RSVPBot
  2. rsvp move <any stream/topic>

Questions:

  1. Should users be able to initialize events in a PM and then move them? Sometimes interacting with RSVPBot is kind of noisy, so it seems like it might be a nice feature to set up the event privately and then move it to another stream. But it's also weird that you can even create an event in a PM with RSVPBot, because if you don't move the event, you're the only person who can see it, which seems kind of pointless.
  2. I guess I only had one question...

Anyway, there are multiple ways to fix this, but it'll depend on the answer to that question.

Here's the traceback:

Traceback (most recent call last):
  File "bot.py", line 108, in <module>
    new_bot.main()
  File "bot.py", line 83, in main
    self.client.call_on_each_message(lambda msg: self.respond(msg))
  File "/Users/alexwilson/.virtualenvs/rsvpbot/lib/python2.7/site-packages/zulip/__init__.py", line 308, in call_on_each_message
    self.call_on_each_event(event_callback, ['message'])
  File "/Users/alexwilson/.virtualenvs/rsvpbot/lib/python2.7/site-packages/zulip/__init__.py", line 301, in call_on_each_event
    callback(event)
  File "/Users/alexwilson/.virtualenvs/rsvpbot/lib/python2.7/site-packages/zulip/__init__.py", line 306, in event_callback
    callback(event['message'])
  File "bot.py", line 83, in <lambda>
    self.client.call_on_each_message(lambda msg: self.respond(msg))
  File "bot.py", line 63, in respond
    self.send_message(reply)
  File "bot.py", line 70, in send_message
    msg_to = msg['sender_email']
KeyError: 'sender_email'

rsvp init does not work when batched with other commands.

Try running the following string as a single chat message:

rsvp init 
rsvp set date Thursday
rsvp set time 12:00
rsvp set duration 1:30

The bot replies privately with error messages. If we do rsvp init separately and then run the rest of the commands in bulk:

rsvp set date Thursday
rsvp set time 12:00
rsvp set duration 1:30

RSVPBot behaves as expected.

Conflict warnings

I have just, for about the thousandth time, set up an event during a time which already had an event in the same room. It'd be neat if RSVPBot warned about this.

Doesn't handle topic names being changed

STR:

  1. rsvp init on, say, the topic foobar
  2. Edit the topic to, say, foobaz
  3. Use a command, e.g. rsvp ping
  4. Notice how RSVPBot PMs you that foobaz is not an RSVPBot event

Display day of the week

Whenever I see an event date, I go back to the calendar to see what day of the week the event is. It is useful to have day of the week along with the event details.

Something like this will be useful

When	2016-11-16 @ 19:00
Where	hopper
Day     Wednesday

I am willing to send a PR.

parse times more sensibly

If someone says set time 3:00, they probably don't mean 3am.

I'd suggest accepting times like (\d+)(:\d\d)?\s*(am|pm)?, case insensitive. If the meridian marker (am/pm) is missing and the hour is less than, say, 8? then treat it as after noon.

If someone wants an early morning event, they can explicitly specify "AM". If they wrote "8:00" and expected it to be in the evening, they can use "8pm" to get what they wanted.

Make RSVPBot run natively on the Zulip server

Hi, I'm one of the core developers for the Zulip project. We are interested in integrating this bot to the Zulip project and running it natively on the Zulip servers. It would require some minor restructuring of the code, so we may just fork it, or we may try to contribute patches.

If this idea interests you, please either reply here or find me on the public Zulip instance:

https://zulip.tabbott.net/#narrow/stream/bots

Store mapping between email addresses and names

Instead of querying the zulip api every time rsvp ping or rsvp summary is used in order to figure what the display (aka "pingable") name is, RSVPBot should maintain its own mapping between display names and email addresses. This would be easy if RSVPBot is listening for events of type realm_user, which are sent when a user's primary name is changed here.

The primary improvement here will be that we can create a dict and look users up by email/key, instead of iterating over an entire list of users.

Add optional `rsvp enable autoping` for calendarized events

  • All events should have an autoping setting that is false by default.
  • If an event is calendarized (has a time, date, and duration, and optionally added to a calendar), and if the creator uses the rsvp enable autoping command, RSVPBot should ping all participants 10 minutes before the event

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.