File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,20 @@ bot.onFollow = async (session, followRequest) => {
5555> or ` ~FollowRequest.reject() ` in the ` ~Bot.onFollow ` event handler,
5656> and the configured policy is ignored for the specific follow request.
5757
58+ > [ !TIP]
59+ > The passed ` FollowRequest ` object can outlive the event handler if your bot
60+ > is configured the [ ` followerPolicy ` ] ( ./bot.md#createbotoptions-followerpolicy )
61+ > option to ` "manual" ` . The following example shows how to accept a follow
62+ > request after an hour:
63+ >
64+ > ~~~~ typescript {2-4}
65+ > bot .onFollow = async (session , followRequest ) => {
66+ > setTimeout (async () => {
67+ > await followRequest .accept ();
68+ > }, 1000 * 60 * 60 );
69+ > };
70+ > ~~~~
71+
5872
5973Unfollow
6074--------
You can’t perform that action at this time.
0 commit comments