generated from Damego/python-pypi-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from interactions-py/unstable
- Loading branch information
Showing
9 changed files
with
195 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
from interactions.ext.version import Version, VersionAuthor | ||
|
||
__all__ = ["version", "base"] | ||
__version__ = "0.0.3" | ||
__version__ = "0.1.0" | ||
|
||
version = Version( | ||
version=__version__, author=VersionAuthor(name="Damego", email="[email protected]") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import List | ||
|
||
from lavalink import AudioTrack, DefaultPlayer | ||
|
||
__all__ = ["Player"] | ||
|
||
|
||
class Player(DefaultPlayer): | ||
async def search_youtube(self, query: str) -> List[AudioTrack]: | ||
res = await self.node.get_tracks(f"ytsearch: {query}") | ||
return res.tracks | ||
|
||
async def search_soundcloud(self, query: str) -> List[AudioTrack]: | ||
res = await self.node.get_tracks(f"scsearch: {query}") | ||
return res.tracks | ||
|
||
async def get_tracks(self, url: str) -> List[AudioTrack]: | ||
res = await self.node.get_tracks(url) | ||
return res.tracks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
discord-py-interactions>=4.3.0 | ||
discord-py-interactions>=4.3.0, <4.3.2 | ||
lavalink~=4.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters