Skip to content

Commit

Permalink
Adjust based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Dec 1, 2018
1 parent 8c70208 commit cafa630
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -101,4 +101,4 @@ ENV/
.mypy_cache/

\.idea/
\.vscode/
\.vscode/
9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -13,7 +13,14 @@ Lavalink.py is a wrapper for [Lavalink](https://github.com/Frederikam/Lavalink)
# Getting Started
You may clone this repository and check out [the docs](docs/). The docs are not hosted anywhere, or 100% complete at the time of writing. If you notice missing documentation, feel free to [open an issue](https://github.com/Devoxin/Lavalink.py/issues/) or [let us know in the Discord server](https://discord.gg/SbJXU9s).

Additionally, there is an [example cog](lavalink/examples) (For Discord.py rewrite).
Additionally, there is an [example cog](lavalink/examples). It should be noted that the example cog is oriented towards usage with Discord.py rewrite and Lavalink v3.1+, although backwards
compatibility may be possible, it's not encouraged nor is support guaranteed.

## Optional Dependencies

`aiodns` - Speed up DNS resolving.

`cchardet` - A faster alternative to `chardet`.

# Links

Expand Down
6 changes: 5 additions & 1 deletion lavalink/examples/music.py
Expand Up @@ -21,7 +21,11 @@ def __init__(self, bot):
bot.lavalink = lavalink.Client(bot.user.id)
bot.lavalink.add_node('127.0.0.1', 2333, 'youshallnotpass', 'eu', 'default-node') # Host, Port, Password, Region, Name
bot.add_listener(bot.lavalink.voice_update_handler, 'on_socket_response')
bot.lavalink.add_event_hook(self.track_hook)

bot.lavalink.add_event_hook(self.track_hook)

def __unload(self):
self.bot.lavalink._event_hooks.clear()

async def track_hook(self, event):
if isinstance(event, lavalink.events.TrackEndEvent):
Expand Down

0 comments on commit cafa630

Please sign in to comment.