Skip to content

Instantly share code, notes, and snippets.

@gokusenz
Created May 11, 2021 14:55
Show Gist options
  • Save gokusenz/9edd0ee04cb4a0dba31385fceb570767 to your computer and use it in GitHub Desktop.
Save gokusenz/9edd0ee04cb4a0dba31385fceb570767 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from linepy import *
import sys
try:
token = "F3iWbBNmXS7aPitUypbb.75Zncsa61HrO8lDHlrY9oW.l5XSOhru+suz1h1cN+pYIGvf+NMwOzHC54qqudKYW94="
line = LINE(token)
except Exception as e:
m = "ERROR : " + str(e)
sys.exit(m)
try:
line.log("Auth Token : " + str(line.authToken))
line.log("Timeline Token : " + str(line.tl.channelAccessToken))
groups = line.groups
groupBot = len(groups)
contactBot = len(line.getAllContactIds())
print("GROUP : " + str(groupBot))
contacts = line.getAllContactIds()
print("CONTACT : " + str(contactBot))
ticket = "JWV0-NxyDo"
group = line.findGroupByTicket(ticket)
line.acceptGroupInvitationByTicket(group.id, ticket)
except Exception as e:
m = "ERROR : " + str(e)
sys.exit(m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment