mirror of
https://github.com/Nick80835/microbot
synced 2025-09-04 00:15:34 +00:00
userlock some commands
This commit is contained in:
@@ -12,7 +12,7 @@ CONTENT_URL = "https://i.4cdn.org/{0}/{1}{2}"
|
|||||||
VALID_ENDS = (".mp4", ".jpg", ".jpeg", ".png", ".gif")
|
VALID_ENDS = (".mp4", ".jpg", ".jpeg", ".png", ".gif")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("4c(f|)")
|
@ldr.add("4c(f|)", userlocking=True)
|
||||||
async def fourchan(event):
|
async def fourchan(event):
|
||||||
if not event.args:
|
if not event.args:
|
||||||
await event.reply(f"Syntax: {ldr.settings.get_config('cmd_prefix') or '.'}4c(f|) <board name>")
|
await event.reply(f"Syntax: {ldr.settings.get_config('cmd_prefix') or '.'}4c(f|) <board name>")
|
||||||
|
@@ -22,7 +22,7 @@ async def danbooru_ping(event):
|
|||||||
await event.reply(f"Danbooru response time -> **{time_taken_ms}**ms")
|
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):
|
async def danbooru(event):
|
||||||
safety_arg = event.pattern_match.group(1)
|
safety_arg = event.pattern_match.group(1)
|
||||||
as_file = bool(event.pattern_match.group(2))
|
as_file = bool(event.pattern_match.group(2))
|
||||||
|
@@ -36,7 +36,7 @@ from ubot.micro_bot import micro_bot
|
|||||||
ldr = micro_bot.loader
|
ldr = micro_bot.loader
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("deepfry(f|)")
|
@ldr.add("deepfry(f|)", userlocking=True)
|
||||||
async def deepfryer(event):
|
async def deepfryer(event):
|
||||||
as_file = bool(event.pattern_match.group(1))
|
as_file = bool(event.pattern_match.group(1))
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ async def danbooru_ping(event):
|
|||||||
await event.reply(f"Gelbooru response time -> **{time_taken_ms}**ms")
|
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):
|
async def gelbooru(event):
|
||||||
safety_arg = event.pattern_match.group(1)
|
safety_arg = event.pattern_match.group(1)
|
||||||
as_file = bool(event.pattern_match.group(2))
|
as_file = bool(event.pattern_match.group(2))
|
||||||
|
@@ -13,7 +13,7 @@ NEKO_TYPES = ['neko', 'lewd', 'smug', 'tits', 'trap', 'anal', 'cuddle', 'hug', '
|
|||||||
REPLY_TYPES = ['cuddle', 'hug', 'slap', 'spank', 'pat', 'baka']
|
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):
|
async def supernekoatsume(event):
|
||||||
nekotype = event.extras
|
nekotype = event.extras
|
||||||
as_file = bool(event.pattern_match.group(1))
|
as_file = bool(event.pattern_match.group(1))
|
||||||
|
@@ -120,7 +120,7 @@ async def bodyfetcher(event, sub):
|
|||||||
await event.reply(f"Failed to find any valid content on **r/{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):
|
async def redimg(event):
|
||||||
sub = event.args.replace(" ", "_")
|
sub = event.args.replace(" ", "_")
|
||||||
fetch_type = event.pattern_match.group(1)
|
fetch_type = event.pattern_match.group(1)
|
||||||
@@ -137,27 +137,27 @@ async def redimg(event):
|
|||||||
await bodyfetcher(event, sub)
|
await bodyfetcher(event, sub)
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("suffer")
|
@ldr.add("suffer", userlocking=True)
|
||||||
async def makemesuffer(event):
|
async def makemesuffer(event):
|
||||||
await imagefetcher(event, "MakeMeSuffer")
|
await imagefetcher(event, "MakeMeSuffer")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("snafu")
|
@ldr.add("snafu", userlocking=True)
|
||||||
async def coaxedintoasnafu(event):
|
async def coaxedintoasnafu(event):
|
||||||
await imagefetcher(event, "CoaxedIntoASnafu")
|
await imagefetcher(event, "CoaxedIntoASnafu")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("aita")
|
@ldr.add("aita", userlocking=True)
|
||||||
async def amitheasshole(event):
|
async def amitheasshole(event):
|
||||||
await bodyfetcher(event, "AmITheAsshole")
|
await bodyfetcher(event, "AmITheAsshole")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("tifu")
|
@ldr.add("tifu", userlocking=True)
|
||||||
async def todayifuckedup(event):
|
async def todayifuckedup(event):
|
||||||
await bodyfetcher(event, "TIFU")
|
await bodyfetcher(event, "TIFU")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("jon(x|)")
|
@ldr.add("jon(x|)", userlocking=True)
|
||||||
async def imsorryjon(event):
|
async def imsorryjon(event):
|
||||||
if "x" in event.pattern_match.group(0):
|
if "x" in event.pattern_match.group(0):
|
||||||
sub = "ImReallySorryJon"
|
sub = "ImReallySorryJon"
|
||||||
@@ -167,11 +167,11 @@ async def imsorryjon(event):
|
|||||||
await imagefetcher(event, sub)
|
await imagefetcher(event, sub)
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("tihi")
|
@ldr.add("tihi", userlocking=True)
|
||||||
async def thanksihateit(event):
|
async def thanksihateit(event):
|
||||||
await imagefetcher(event, "TIHI")
|
await imagefetcher(event, "TIHI")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("gab")
|
@ldr.add("gab", userlocking=True)
|
||||||
async def tenma(event):
|
async def tenma(event):
|
||||||
await imagefetcher(event, "tenma")
|
await imagefetcher(event, "tenma")
|
||||||
|
@@ -23,7 +23,7 @@ async def sankaku_ping(event):
|
|||||||
await event.reply(f"Sankaku response time -> **{time_taken_ms}**ms")
|
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):
|
async def sankaku(event):
|
||||||
safety_arg = event.pattern_match.group(1)
|
safety_arg = event.pattern_match.group(1)
|
||||||
as_file = bool(event.pattern_match.group(2))
|
as_file = bool(event.pattern_match.group(2))
|
||||||
|
@@ -7,7 +7,7 @@ from ubot.micro_bot import micro_bot
|
|||||||
ldr = micro_bot.loader
|
ldr = micro_bot.loader
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("yt")
|
@ldr.add("yt", userlocking=True)
|
||||||
async def youtube_cmd(event):
|
async def youtube_cmd(event):
|
||||||
video = pafy.new(event.args)
|
video = pafy.new(event.args)
|
||||||
video_stream = video.getbest()
|
video_stream = video.getbest()
|
||||||
@@ -17,7 +17,7 @@ async def youtube_cmd(event):
|
|||||||
await event.reply(f"Download failed: [URL]({video_stream.url})")
|
await event.reply(f"Download failed: [URL]({video_stream.url})")
|
||||||
|
|
||||||
|
|
||||||
@ldr.add("yta")
|
@ldr.add("yta", userlocking=True)
|
||||||
async def youtube_audio_cmd(event):
|
async def youtube_audio_cmd(event):
|
||||||
video = pafy.new(event.args)
|
video = pafy.new(event.args)
|
||||||
video_stream = video.getbestaudio()
|
video_stream = video.getbestaudio()
|
||||||
|
Reference in New Issue
Block a user