2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 22:46:01 +00:00

userlock some commands

This commit is contained in:
Nick80835
2020-06-16 19:16:06 -04:00
parent 6dcb9a40be
commit 224d6a5578
8 changed files with 16 additions and 16 deletions

View File

@@ -12,7 +12,7 @@ CONTENT_URL = "https://i.4cdn.org/{0}/{1}{2}"
VALID_ENDS = (".mp4", ".jpg", ".jpeg", ".png", ".gif")
@ldr.add("4c(f|)")
@ldr.add("4c(f|)", userlocking=True)
async def fourchan(event):
if not event.args:
await event.reply(f"Syntax: {ldr.settings.get_config('cmd_prefix') or '.'}4c(f|) <board name>")

View File

@@ -22,7 +22,7 @@ async def danbooru_ping(event):
await event.reply(f"Danbooru response time -> **{time_taken_ms}**ms")
@ldr.add("dan(s|x|q|)(f|)", nsfw=True)
@ldr.add("dan(s|x|q|)(f|)", nsfw=True, userlocking=True)
async def danbooru(event):
safety_arg = event.pattern_match.group(1)
as_file = bool(event.pattern_match.group(2))

View File

@@ -36,7 +36,7 @@ from ubot.micro_bot import micro_bot
ldr = micro_bot.loader
@ldr.add("deepfry(f|)")
@ldr.add("deepfry(f|)", userlocking=True)
async def deepfryer(event):
as_file = bool(event.pattern_match.group(1))

View File

@@ -26,7 +26,7 @@ async def danbooru_ping(event):
await event.reply(f"Gelbooru response time -> **{time_taken_ms}**ms")
@ldr.add("gel(s|x|q|)(f|)", nsfw=True)
@ldr.add("gel(s|x|q|)(f|)", nsfw=True, userlocking=True)
async def gelbooru(event):
safety_arg = event.pattern_match.group(1)
as_file = bool(event.pattern_match.group(2))

View File

@@ -13,7 +13,7 @@ NEKO_TYPES = ['neko', 'lewd', 'smug', 'tits', 'trap', 'anal', 'cuddle', 'hug', '
REPLY_TYPES = ['cuddle', 'hug', 'slap', 'spank', 'pat', 'baka']
@ldr.add_list(NEKO_TYPES, nsfw=True, pattern_extra="(f|)")
@ldr.add_list(NEKO_TYPES, nsfw=True, pattern_extra="(f|)", userlocking=True)
async def supernekoatsume(event):
nekotype = event.extras
as_file = bool(event.pattern_match.group(1))

View File

@@ -120,7 +120,7 @@ async def bodyfetcher(event, sub):
await event.reply(f"Failed to find any valid content on **r/{sub}**!")
@ldr.add("red(i|t|b)")
@ldr.add("red(i|t|b)", userlocking=True)
async def redimg(event):
sub = event.args.replace(" ", "_")
fetch_type = event.pattern_match.group(1)
@@ -137,27 +137,27 @@ async def redimg(event):
await bodyfetcher(event, sub)
@ldr.add("suffer")
@ldr.add("suffer", userlocking=True)
async def makemesuffer(event):
await imagefetcher(event, "MakeMeSuffer")
@ldr.add("snafu")
@ldr.add("snafu", userlocking=True)
async def coaxedintoasnafu(event):
await imagefetcher(event, "CoaxedIntoASnafu")
@ldr.add("aita")
@ldr.add("aita", userlocking=True)
async def amitheasshole(event):
await bodyfetcher(event, "AmITheAsshole")
@ldr.add("tifu")
@ldr.add("tifu", userlocking=True)
async def todayifuckedup(event):
await bodyfetcher(event, "TIFU")
@ldr.add("jon(x|)")
@ldr.add("jon(x|)", userlocking=True)
async def imsorryjon(event):
if "x" in event.pattern_match.group(0):
sub = "ImReallySorryJon"
@@ -167,11 +167,11 @@ async def imsorryjon(event):
await imagefetcher(event, sub)
@ldr.add("tihi")
@ldr.add("tihi", userlocking=True)
async def thanksihateit(event):
await imagefetcher(event, "TIHI")
@ldr.add("gab")
@ldr.add("gab", userlocking=True)
async def tenma(event):
await imagefetcher(event, "tenma")

View File

@@ -23,7 +23,7 @@ async def sankaku_ping(event):
await event.reply(f"Sankaku response time -> **{time_taken_ms}**ms")
@ldr.add("san(s|x|q|)(f|)", nsfw=True)
@ldr.add("san(s|x|q|)(f|)", nsfw=True, userlocking=True)
async def sankaku(event):
safety_arg = event.pattern_match.group(1)
as_file = bool(event.pattern_match.group(2))

View File

@@ -7,7 +7,7 @@ from ubot.micro_bot import micro_bot
ldr = micro_bot.loader
@ldr.add("yt")
@ldr.add("yt", userlocking=True)
async def youtube_cmd(event):
video = pafy.new(event.args)
video_stream = video.getbest()
@@ -17,7 +17,7 @@ async def youtube_cmd(event):
await event.reply(f"Download failed: [URL]({video_stream.url})")
@ldr.add("yta")
@ldr.add("yta", userlocking=True)
async def youtube_audio_cmd(event):
video = pafy.new(event.args)
video_stream = video.getbestaudio()