GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The2020CoderBot/main.py at main · Nalin-Angrish/The2020CoderBot

This repository was archived by the owner on Mar 25, 2022. It is now read-only.

Expand file tree

/

main.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
50 lines (35 loc) · 1011 Bytes
/

main.py

Copy path

File metadata and controls

50 lines (35 loc) · 1011 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/python
from dotenv import load_dotenv
load_dotenv()
import os
os.environ['OPENBLAS_NUM_THREADS'] = '1'
from flask import Flask, request
import json
from ext.bot import TOKEN, client as bot
from ext.commands import Commands
from ext.sudo_commands import SudoCommands
from ext import instagram
import asyncio
from threading import Thread
app = Flask(__name__)
bot.add_cog(SudoCommands(bot))
bot.add_cog(Commands(bot))
instagram.setup(bot)
@app.route("/")
def index():
return "Hello World!"
@app.route("/instagram_pic_posted")
def onPost():
data = request.get_data().decode().replace("\n", "*-*-*")
data = json.loads(data)
print("The2020Coder uploaded a post on Instagram!")
bot.dispatch("post_pic", bot=bot, post=data)
print("Now posting it on Discord.")
return "Thanks!"
def init():
loop = asyncio.get_event_loop()
loop.create_task(bot.start(TOKEN))
Thread(target=loop.run_forever).start()
init()
if __name__ == "__main__":
app.run(port=20202, host="0.0.0.0", debug=False)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.