Git Product home page Git Product logo

tangerine's People

Contributors

dependabot-preview[bot] avatar gmeluski avatar johnbenjaminlewis avatar meganehouser avatar nficano avatar popsikle avatar svisser 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  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

tangerine's Issues

As a drunk user, gendo should filter my requests

Use Case 1:
Request includes "image" and any term from our predetermined phallic dictionary
i.e. Drunk user enters "@gendo image me cat dicks", gendo responds "Go home you're drunk"

Use Case 2:
Request includes a personal attack on your friends that slightly crosses the line
i.e. username is "alleycat" and request includes at least two typos

Tangerine returns messages several times

Hi, I'm trying to detect a message with a specific keyword, and tried this example

`from tangerine import Tangerine
tangerine = Tangerine("xoxb-xx")
@tangerine.listen_for('m')
def getspa(user, message):
s = 'I see you like ' + message
print(message)
return s

@tangerine.listen_for('morning')
def morning(user, message):
return "mornin' @{user.username}"

if name == "main":
tangerine.run()
`
The problem is that, I received several repeated messages, so for example , I entered:
just the letter m I got:
I see you like m
I see you like I see you like m
I see you like I see you like I see you like m
and it goes on and on till I kill it.
am I doing something wrong?
Thanks

As a Gendo, I should be sentient.

As a user, I expect Gendo to become self-aware and make a moral choice as to whether he is destined to help mankind or terminate mankind

Help with crontab

@gendo.cron('0 9 * * *') def cookies(user, message): return 'morning everyonee'

can you help me why the cron for this not working. how to fix it

Python 2.7 not able to load tangerine

Tested the bot on both python 2.7 and 3.7.0
The bot works perfectly on 3.7 but throws this error on 2.7

File “slackbot.py”, line 3, in
from tangerine import Tangerine
ImportError: No module named tangerine

Is it possible to specified a channel for the bot to handle?

Is it possible to specified a channel for the slack-bot to handle?

Example with "#general" channel:

Method1

@tangerine.listen_for("hello")
def hello(user, message, channel):
if channel == "#general":
return "world"

Or

Method2

@tangerine.listen_for("hello", "#general")
def hello(user, message):
return "world"

I prefer combine both Method1 and Method2. Just like:

Method3

@tangerine.listen_for("hello", ["#general", "chatroom", "faq"])
def hello(user, message, channel):
if channel == "#general":
return "world"
elif channel == "#chatroom":
return "hello"
elif channel == "#faq":
return "WORLD"

Issues setting up environment

Hi Nick!
This looks like an awesome library and I am so excited to use it to update our current slackbot.

I've followed instructions as suggested and am running into environmental/dependency issues getting the basic bot script to work. This is the error I'm getting:

Traceback (most recent call last):
  File "<REDACTED>/bot.py", line 2, in <module>
    from tangerine import Tangerine
  File "<VENV_REDACTED>/lib/python3.7/site-packages/tangerine/__init__.py", line 10, in <module>
    from .bot import Tangerine
  File <VENV_REDACTED>/lib/python3.7/site-packages/tangerine/bot.py", line 17, in <module>
    from slackclient import SlackClient
ModuleNotFoundError: No module named 'slackclient'

And here is my Pipfile:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
slack-tangerine = "*"
crontab = "*"
jinja2 = "*"
python-box = "*"
pyyaml = "*"
six = "*"
slackclient = "2.9.3"

[requires]
python_version = "3.7"

And it shows the Pipfile.lock reflects the slackclient.

        },
        "slack-tangerine": {
            "hashes": [
                "sha256:92fa45aa2c2c75594212375a82a52e1ff8edc94b5dcb18b9d626efcc14367fce",
                "sha256:b513504e26d21d6d0421d7edf0eb8417f6b57e6fb078b6cec0d0ca80558eb8a8"
            ],
            "index": "pypi",
            "version": "==5.1.0"
        },
        "slackclient": {
            "hashes": [
                "sha256:07ec8fa76f6aa64852210ae235ff9e637ba78124e06c0b07a7eeea4abb955965",
                "sha256:2d68d668c02f4038299897e5c4723ab85dd40a3548354924b24f333a435856f8"
            ],
            "index": "pypi",
            "version": "==2.9.3"
        },

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.