diff --git a/ubot/modules/4chan.py b/ubot/modules/4chan.py index 20fa937..f4d14b7 100644 --- a/ubot/modules/4chan.py +++ b/ubot/modules/4chan.py @@ -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|) ") diff --git a/ubot/modules/danbooru.py b/ubot/modules/danbooru.py index a050816..a1516f8 100644 --- a/ubot/modules/danbooru.py +++ b/ubot/modules/danbooru.py @@ -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)) diff --git a/ubot/modules/deepfry.py b/ubot/modules/deepfry.py index 96778a4..d88dc3d 100644 --- a/ubot/modules/deepfry.py +++ b/ubot/modules/deepfry.py @@ -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)) diff --git a/ubot/modules/gelbooru.py b/ubot/modules/gelbooru.py index 3904c4a..157d7bd 100644 --- a/ubot/modules/gelbooru.py +++ b/ubot/modules/gelbooru.py @@ -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)) diff --git a/ubot/modules/nekos.py b/ubot/modules/nekos.py index f3d03f4..7d908ee 100644 --- a/ubot/modules/nekos.py +++ b/ubot/modules/nekos.py @@ -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)) diff --git a/ubot/modules/reddit.py b/ubot/modules/reddit.py index 2d88fff..cccba67 100644 --- a/ubot/modules/reddit.py +++ b/ubot/modules/reddit.py @@ -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") diff --git a/ubot/modules/sankaku.py b/ubot/modules/sankaku.py index 96731dc..fd2ca8f 100644 --- a/ubot/modules/sankaku.py +++ b/ubot/modules/sankaku.py @@ -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)) diff --git a/ubot/modules/youtube.py b/ubot/modules/youtube.py index 7d5ebfa..f3f4b9d 100644 --- a/ubot/modules/youtube.py +++ b/ubot/modules/youtube.py @@ -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()