Prepare for migration to new repo
This commit is contained in:
@@ -1,93 +0,0 @@
|
|||||||
import asyncio
|
|
||||||
import discord
|
|
||||||
from discord.ext import commands
|
|
||||||
import os
|
|
||||||
import praw
|
|
||||||
from random import randint
|
|
||||||
|
|
||||||
class Porno(object):
|
|
||||||
"""Porno commando's. Jij weet wat er aan is."""
|
|
||||||
|
|
||||||
def __init__(self, bot):
|
|
||||||
self.bot = bot
|
|
||||||
self.voice_states = {}
|
|
||||||
self.fileIndex = {}
|
|
||||||
self.r = praw.Reddit(
|
|
||||||
user_agent='StroopwafelBot',
|
|
||||||
client_secret='Z4K17T8TC26cNAgDSRxCkE9jYR4',
|
|
||||||
client_id='aWeyKpzdHMtmJQ'
|
|
||||||
)
|
|
||||||
self.r.read_only = True
|
|
||||||
def __check(self, ctx): #Todo: Is dit het porno kanaal?
|
|
||||||
return True
|
|
||||||
|
|
||||||
def randomJpgFromFolder(self, dir):
|
|
||||||
if dir not in self.fileIndex.keys():
|
|
||||||
self.fileIndex[dir] = [] #empty list
|
|
||||||
for dirname, dirnames, filenames in os.walk('./'+ dir):
|
|
||||||
for filename in filenames:
|
|
||||||
if filename.endswith('.jpg'):
|
|
||||||
self.fileIndex[dir].append(os.path.join(dirname, filename))
|
|
||||||
#now we should have an index for the selected folder, but it might still be empty (i.e. empty folder given)
|
|
||||||
if self.fileIndex[dir]:
|
|
||||||
return self.fileIndex[dir][randint(0,len(self.fileIndex[dir])-1)] #get a random element from the newly created index
|
|
||||||
else:
|
|
||||||
return 'default file here'
|
|
||||||
|
|
||||||
@commands.command(pass_context=True)
|
|
||||||
@asyncio.coroutine
|
|
||||||
def nsfw(self, ctx):
|
|
||||||
""" random post uit een nsfw subreddit, ... """
|
|
||||||
print(type(ctx.message.channel))
|
|
||||||
try:
|
|
||||||
if(not ctx.message.channel.is_nsfw()):
|
|
||||||
yield from ctx.channel.send("Alleen toegestaan in een NSFW kanaal")
|
|
||||||
return
|
|
||||||
except:
|
|
||||||
print("borf")
|
|
||||||
randnsfw = self.r.subreddit('randnsfw')
|
|
||||||
post = randnsfw.random()
|
|
||||||
try:
|
|
||||||
yield from ctx.message.delete()
|
|
||||||
except:
|
|
||||||
print("No permission to delete message")
|
|
||||||
yield from ctx.channel.send(ctx.author.mention + " Uit r/"+ randnsfw.display_name +": " + post.url)
|
|
||||||
|
|
||||||
|
|
||||||
@commands.command(pass_context=True)
|
|
||||||
@asyncio.coroutine
|
|
||||||
def nya(self, ctx):
|
|
||||||
""" nya? """
|
|
||||||
print(type(ctx.message.channel))
|
|
||||||
try:
|
|
||||||
if(not ctx.message.channel.is_nsfw()):
|
|
||||||
yield from ctx.channel.send("Alleen toegestaan in een NSFW kanaal")
|
|
||||||
return
|
|
||||||
except:
|
|
||||||
print("borf")
|
|
||||||
meow = self.r.subreddit('cat_girls+NekoIRL+Nekomimi')
|
|
||||||
post = meow.random()
|
|
||||||
try:
|
|
||||||
yield from ctx.message.delete()
|
|
||||||
except:
|
|
||||||
print("No permission to delete message")
|
|
||||||
yield from ctx.channel.send(ctx.author.mention + " " + post.url)
|
|
||||||
|
|
||||||
@commands.command(pass_context=True)
|
|
||||||
@asyncio.coroutine
|
|
||||||
def gay(self, ctx):
|
|
||||||
""" Gay & NSFW. Wat wilt een mens nog meer? """
|
|
||||||
print(type(ctx.message.channel))
|
|
||||||
try:
|
|
||||||
if(not ctx.message.channel.is_nsfw()):
|
|
||||||
yield from ctx.channel.send("Alleen toegestaan in een NSFW kanaal")
|
|
||||||
return
|
|
||||||
except:
|
|
||||||
print("borf")
|
|
||||||
gaynsfw = self.r.subreddit('autofellatio+Balls+baramanga+BHMGoneWild+bigbrotherbros+Bisexy+blackballed+blackcock+blackmale+Boners+BonersInPublic+broslikeus+Bulge+Bulges+CelebrityPenis+chesthairporn+ChubbySilverDaddies+circumcisions+cock+CockOutline+CubsGoneWild+CumCannonAddicts+CuteGuyButts+daddybears+DickSlips+FMN+foreskin+gayasshole+gaybears+gaybrosgonemild+GaybrosGoneWild+GayChubs+gaycumsluts+GayDaddiesPics+GayGifs+gayholdthemoan+gayincest+GayKink+gaymersgonewild+GayMuscleWorship+gaynsfw+gayotters+gayporn+gaypornhunters+gaypornornotgayporn+gaypornwithplot+GaySnapchatImages+gaystoriesgonewild+gaystrugglefuck+gayvideos+GayWatersports+gfur+gingerdudes+grower+guyskissing+HeSquats+Homosexual+hotguyswithtattoos+insanelyhairymen+jockstraps+jockwatch+ladybonersgw+leathermen+LegionairresGoneWild+LGBTGoneWild+LGBTreesGoneWild+lovegaymale+MaleArmpits+malemodels+malepornstars+malespandex+MaleUnderwear+manass+mangonewild+manlove+ManSex+MassiveCock+MensHighJinx+menslegs+MrBlowJob+nocategory+nopullingout+NSFW_GAY+NSFW_gay_porn+OhCumOn+penis+POCLadyBoners+PublicBoys+RedditorCum+SceneBoys+selfservice+Singlets+softies+speedos+TotallyStraight+TwinkLove+twinks+UniformedMen+VintageGayPics')
|
|
||||||
post = gaynsfw.random()
|
|
||||||
try:
|
|
||||||
yield from ctx.message.delete()
|
|
||||||
except:
|
|
||||||
print("No permission to delete message")
|
|
||||||
yield from ctx.channel.send(ctx.author.mention + " " + post.url)
|
|
||||||
+1
-3
@@ -1,7 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import discord
|
import discord
|
||||||
#import Music
|
#import Music
|
||||||
import Porno
|
|
||||||
import Shitpost
|
import Shitpost
|
||||||
import General
|
import General
|
||||||
import Cryptocoin
|
import Cryptocoin
|
||||||
@@ -15,9 +14,8 @@ logging.basicConfig(level=logging.INFO)
|
|||||||
|
|
||||||
bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Stroopwafel. Shitpost bot extraordinaire.', pm_help=True)
|
bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Stroopwafel. Shitpost bot extraordinaire.', pm_help=True)
|
||||||
#bot.add_cog(Music.Music(bot))
|
#bot.add_cog(Music.Music(bot))
|
||||||
|
#TODO: Re-add music functions now that we require a stronger host
|
||||||
bot.add_cog(Shitpost.Shitpost(bot))
|
bot.add_cog(Shitpost.Shitpost(bot))
|
||||||
#importlib.import_module('Shitpost')
|
|
||||||
bot.add_cog(Porno.Porno(bot))
|
|
||||||
bot.add_cog(General.General(bot))
|
bot.add_cog(General.General(bot))
|
||||||
bot.add_cog(Cryptocoin.Cryptocoin(bot))
|
bot.add_cog(Cryptocoin.Cryptocoin(bot))
|
||||||
bot.add_cog(Chatbot.Chatbot(bot))
|
bot.add_cog(Chatbot.Chatbot(bot))
|
||||||
|
|||||||
Reference in New Issue
Block a user