Funguy Plugin Enable/Disable feature per room, save to conf file
This commit is contained in:
@@ -32,7 +32,7 @@ async def fetch_youtube_info(youtube_url):
|
||||
|
||||
async def handle_command(room, message, bot, prefix, config):
|
||||
match = botlib.MessageMatch(room, message, bot, prefix)
|
||||
if match.is_not_from_this_bot() and re.search(r'youtube\.com/watch\?v=', message.body) and room.room_id != '!uFhErnfpYhhlauJsNK:matrix.org':
|
||||
if match.is_not_from_this_bot() and re.search(r'youtube\.com/watch\?v=', message.body): # and room.room_id != '!uFhErnfpYhhlauJsNK:matrix.org':
|
||||
logging.info("YouTube link detected")
|
||||
video_id_match = re.search(r'youtube\.com/watch\?v=([^\s]+)', message.body)
|
||||
if video_id_match:
|
||||
|
Reference in New Issue
Block a user