This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is what you have to do: | |
1. Install MultiMC (https://multimc.org/) | |
2. Click Accounts in top right corner and add your MC account | |
3. Add a new instance (first icon), select Minecraft 1.7.10 | |
4. Click on "Edit instance" after selecting your new instance | |
5. Click "Install Forge" and select 1448 | |
6. Close the edit window | |
7. Open the Instance Folder ("Instance Folder" on the right) | |
8. Open the minecraft/ folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import request | |
app = Flask(__name__) | |
@app.route('/testbot', methods=["GET"]) | |
def confirm(): | |
return 'Hello World!' | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import request | |
app = Flask(__name__) | |
@app.route('/testbot', methods=["GET"]) | |
def confirm(): | |
if request.args['hub.verify_token'] == "cd7czs87czds8chsiuh9eh3k3bcjhdbjhb": | |
return request.args['hub.challenge'] | |
return 'Hello World!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'entry': [{'id': 1779681335651753, | |
'messaging': [{'message': {'mid': 'mid.1461599731432:95a28608b48b993283', | |
'seq': 6, | |
'text': 'Hallo Bot!'}, | |
'recipient': {'id': 1779681335651753}, | |
'sender': {'id': 875317532580370}, | |
'timestamp': 1461599731441}], | |
'time': 1461599731622}], | |
'object': 'page'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'message': { | |
'text': 'Toll, Du hast folgendes gesagt: Hallo' | |
}, | |
'recipient': { | |
'id': 875317532580370 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import request | |
import requests | |
import json | |
PAGE_TOKEN="please use your own token here" | |
app = Flask(__name__) | |
@app.route('/testbot', methods=["GET"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_image(recipient_id, image_url): | |
"""send an image to a recipient""" | |
recipient = { 'id' : recipient_id } | |
# create an image object | |
image = { 'url' : image_url } | |
# add the image object to an attachment of type "image" | |
attachment = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle_messages(data): | |
"""handle all incoming messages""" | |
messaging_events = data['entry'][0]['messaging'] | |
for event in messaging_events: | |
sender_id = event['sender']['id'] | |
# check if we actually have some input | |
if "message" in event and event['message'].get("text","") != "": | |
text = event['message']['text'] | |
# send a simple text reply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
u 'postback': { | |
u 'payload': u 'my postback string' | |
}, | |
u 'recipient': { | |
u 'id': 129283210520070 | |
}, | |
u 'sender': { | |
u 'id': 1049549878444680 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- Minecraft Crash Report ---- | |
WARNING: coremods are present: | |
LoadingPlugin (Quark-r1.0-56.jar) | |
SHLoadingPlugin (ScalingHealth-1.9.4-0.2.5-24.jar) | |
LoadingPlugin (RandomThings-MC1.10.2-3.7.6.jar) | |
AppleCore (AppleCore-mc1.10.2-2.0.1.jar) | |
MalisisCorePlugin (malisiscore-1.10.2-4.2.5.jar) | |
IvToolkit (IvToolkit-1.2.8.5.jar) | |
BookshelfLoadingPlugin (Bookshelf-1.10.2-1.4.2.327.jar) |