corobo icon indicating copy to clipboard operation
corobo copied to clipboard

plugins:Add plugin for saying no to 'sir'

Open AkshJain99 opened this issue 5 years ago • 2 comments

Reviewers Checklist

  • [x] Appropriate logging is done.
  • [x] Appropriate error responses.
  • [x] Handle every possible exception.
  • [x] Make sure there is a docstring in the command functions. Hint: Lookout for botcmd and re_botcmd decorators.
  • [x] See that 100% coverage is there.
  • [x] See to it that mocking is not done where it is not necessary.

AkshJain99 avatar Mar 09 '19 23:03 AkshJain99

Okay ,sure I will do that in bit

On Tue, 23 Apr 2019, 10:47 pm Keshav Garg, [email protected] wrote:

@KVGarg requested changes on this pull request.

Please re-base your branch!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coala/corobo/pull/651#pullrequestreview-229686402, or mute the thread https://github.com/notifications/unsubscribe-auth/AHCL3B5FX3TOY5CRYOEGRMTPR5ADPANCNFSM4G432YBA .

AkshJain99 avatar Apr 23 '19 17:04 AkshJain99

@kvgarg sure I will look after ur suggestions , actually I m quite busy for a day or two soon I will look towards this pr Thanks

On Tue, 23 Apr 2019, 11:06 pm Keshav Garg, [email protected] wrote:

@KVGarg commented on this pull request.

In plugins/no_sir.py https://github.com/coala/corobo/pull/651#discussion_r277792542:

+import re +from errbot import BotPlugin

+class no_sir(BotPlugin):

  • """
  • Do not use sir
  • """
  • def callback_message(self, msg):
  •    emots = [':D']
    
  •    match_sir = re.search(r'\bsir\b', '\bSir\b', msg.body)
    
  •    if match_sir:
    
  •        self.send(
    
  •          msg.frm,
    
  •          '@{}, Do not use sir in your conversation. {}'.format(
    

I guess we can frame a message somewhat like this

Hi @ :wave:! We don't use "Sir" in the community during the conversation. It's perfectly fine to call them via there usernames or handle. Also, If you to do such think you can better go with buddy :smiley:

Something like this the message can be framed!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coala/corobo/pull/651#discussion_r277792542, or mute the thread https://github.com/notifications/unsubscribe-auth/AHCL3B3LYBUB2IGAHLASYCLPR5CKDANCNFSM4G432YBA .

AkshJain99 avatar Apr 23 '19 17:04 AkshJain99