switch to tweepy
This commit is contained in:
+9
-4
@@ -6,6 +6,8 @@ import secrets
|
||||
import catchup
|
||||
import listen
|
||||
|
||||
from api import API
|
||||
|
||||
def init_argparse():
|
||||
p = argparse.ArgumentParser(description='Twitter bot that follows interactions between Nijisanji EN/ID and hololive EN/ID members.', formatter_class=RawTextHelpFormatter)
|
||||
p.add_argument('mode', nargs='?', \
|
||||
@@ -28,14 +30,17 @@ def main():
|
||||
|
||||
if args.mode is None: return
|
||||
|
||||
api = API()
|
||||
api.get_tweets(1390620618001838086)
|
||||
|
||||
# determine running mode
|
||||
match args.mode.lower():
|
||||
case 'l' | 'listen':
|
||||
print('LISTEN MODE\n')
|
||||
catchup.run()
|
||||
case 'c' | 'catchup':
|
||||
print('CATCH-UP MODE\n')
|
||||
print('RUNNING IN LISTEN MODE\n')
|
||||
listen.run()
|
||||
case 'c' | 'catchup':
|
||||
print('RUNNING IN CATCH-UP MODE\n')
|
||||
catchup.run()
|
||||
case _:
|
||||
print('\ninvalid mode. run with no arguments for help page, including mode list.')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user