Add framework for using reddit
parent
d0c20b178a
commit
660c3106d5
|
@ -8,3 +8,7 @@ token:
|
||||||
|
|
||||||
#Channel IDs
|
#Channel IDs
|
||||||
bot_channel_id:
|
bot_channel_id:
|
||||||
|
|
||||||
|
#Reddit Stuff
|
||||||
|
reddit_client_id:
|
||||||
|
reddit_client_secret:
|
|
@ -5,6 +5,7 @@ import configparser
|
||||||
import datetime
|
import datetime
|
||||||
import random
|
import random
|
||||||
import xkcd
|
import xkcd
|
||||||
|
import praw
|
||||||
|
|
||||||
#Import config file
|
#Import config file
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
@ -13,6 +14,12 @@ config.read("/srv/discord-pocketbot/config.cfg")
|
||||||
token = config.get("configuration", "token")
|
token = config.get("configuration", "token")
|
||||||
bot_channel_id = discord.Object(id=config.get("configuration", "bot_channel_id"))
|
bot_channel_id = discord.Object(id=config.get("configuration", "bot_channel_id"))
|
||||||
|
|
||||||
|
#Reddit Setup
|
||||||
|
reddit_client_id = config.get("configuration", "reddit_client_id")
|
||||||
|
reddit_client_secret = config.get("configuration", "reddit_client_secret")
|
||||||
|
reddit_user_agent = 'linux:com.pocketjawa.discord-pocketbot:v0.1 (by /u/pocketjava)'
|
||||||
|
reddit = praw.Reddit(client_id=reddit_client_id,client_secret=reddit_client_secret,user_agent=reddit_user_agent)
|
||||||
|
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
|
|
||||||
#Subroutine to get UPS Status
|
#Subroutine to get UPS Status
|
||||||
|
|
Loading…
Reference in New Issue