Skip to content

add friendship & scheduler bot #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2020
Merged

add friendship & scheduler bot #11

merged 2 commits into from
Jun 28, 2020

Conversation

wj-Mcat
Copy link
Collaborator

@wj-Mcat wj-Mcat commented May 29, 2020

create friendship bot and scheduler bot refer to wechaty-getting-started.

@wj-Mcat wj-Mcat requested a review from a team as a code owner May 29, 2020 09:09
@wj-Mcat wj-Mcat requested review from huan and huangaszaq May 29, 2020 09:09
Copy link
Contributor

@huangaszaq huangaszaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

self.auto_reply_comment = "Automatic Reply: I cannot read your message because I'm busy now, will talk to you when I get back."

async def on_friendship(self, friendship: Friendship):
administrator = bot.Contact.load('admin-id')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we define a admin-id as a global variable? Then it is easier to understand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable or global variable pattern depends on the developers. Even admin-id from database is all supported. This is the only contact-id string here. I believe it's easier to understand.

@wj-Mcat wj-Mcat merged commit ccd2a75 into wechaty:master Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants