diff --git a/bell.wav b/bell.wav new file mode 100644 index 0000000..1e0fd88 Binary files /dev/null and b/bell.wav differ diff --git a/open.py b/open.py index 3a7afc4..e474ce5 100644 --- a/open.py +++ b/open.py @@ -4,6 +4,7 @@ from discord.ext.commands import Bot from discord.ext import commands import re +import winsound ''' by cleary#6546 // @preorderd @@ -26,6 +27,9 @@ #enter token of discord account that has access to watch specified channels token = '' +#whether you would like to hear a bell sound as soon as a link is opened +playBellSound = True + global start_count start_count = 0 @@ -35,6 +39,8 @@ async def check_urls(urls): if any(x in url.lower() for x in keywords) and all(x not in url.lower() for x in blacklist): #enter path to chrome here, for windows 10, this should work webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open(url) + if playBellSound: + winsound.PlaySound('bell.wav', winsound.SND_FILENAME) print(f'Opened {url}') @client.event