Compare commits

...

15 Commits
3.1.3 ... 3.1.9

Author SHA1 Message Date
Michael H
ec0c71d5c2 [3.1.9]
- Patches over an issue with audio
  - More comprehensive fix restoring some of this functionality more
  safely planned Please enter the commit message for your changes. Lines starting
2020-01-08 14:57:13 -05:00
Michael H
3eb4017263 [3.1.9]
- Patches over an issue with audio
  - More comprehensive fix restoring some of this functionality more
  safely planned
2020-01-08 14:48:12 -05:00
Michael H
6b5bcdfe74 d.py version 1.2.5 2019-11-18 19:23:56 -05:00
Michael H
2bd082e8f2 This is everything *except* the d.py update 2019-11-18 18:56:02 -05:00
Michael H
7d36cc8366 3.1.7 2019-11-05 05:53:29 -05:00
Michael H
9fc0e627ee [Release] 3.1.7
- Handles a dependency issue for python3.8
- Updates the Lavalink jar used
  - This include's Nin's stat fix
  - Streaming from Soundcloud is working again, at least for now.
2019-11-05 05:29:08 -05:00
Michael H
989e16b20b Lavalink bump to 3.2.1_846 2019-11-05 05:28:34 -05:00
Michael H
1c648abea2 uvloop + python3.8 2019-11-05 05:23:25 -05:00
Michael H
11d87067aa Version Bump
- d.py 1.2.3 -> 1.2.4
 - Red 3.1.5 -> 3.1.6

This fixes a critical issue with voice connections.
2019-10-17 21:43:24 -04:00
Toby Harradine
6c9c57c14d Bump version to 3.1.5
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-31 09:23:18 +10:00
Toby Harradine
404c5f6dc0 [Audio] Bump Lavalink version to 3.2.1_823
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-31 09:22:16 +10:00
Toby Harradine
f0f274e1e1 Bump version to 3.1.4
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-16 11:26:25 +10:00
Toby Harradine
e9f014df07 Revert "Update Crowdin configuration file" (#2878)
This reverts commit 03e59ea9.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-16 10:44:49 +10:00
Toby Harradine
778eadd418 [ModLog] Fix get_case() and get_casetype() (#2877)
This fixes `[p]reason` and `[p]case` with cases that were created after 3.1.3.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-15 20:18:21 +10:00
Toby Harradine
3de9d15410 [CustomCom] Set Requires.ready_event before invoking CC (#2876)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-15 20:13:06 +10:00
7 changed files with 45 additions and 35 deletions

View File

@@ -2,7 +2,7 @@ api_key_env: CROWDIN_API_KEY
project_identifier_env: CROWDIN_PROJECT_ID
base_path: ./redbot/
files:
- source: cogs/**/locales/messages.pot
- source: cogs/**/messages.pot
translation: /%original_path%/%locale%.po
- source: core/**/locales/messages.pot
- source: core/**/messages.pot
translation: /%original_path%/%locale%.po

View File

@@ -3,7 +3,6 @@ import sys as _sys
import warnings as _warnings
from math import inf as _inf
from typing import (
Any as _Any,
ClassVar as _ClassVar,
Dict as _Dict,
List as _List,
@@ -174,7 +173,7 @@ class VersionInfo:
)
__version__ = "3.1.3"
__version__ = "3.1.9"
version_info = VersionInfo.from_str(__version__)
# Filter fuzzywuzzy slow sequence matcher warning

View File

@@ -1737,6 +1737,9 @@ class Audio(commands.Cog):
# YouTube or Soundcloud playlist
track_len = 0
for track in tracks:
if len(player.queue) >= 10000:
await ctx.send("I can't add anything else to the queue.")
break
if guild_data["maxlength"] > 0:
if self._track_limit(ctx, track, guild_data["maxlength"]):
track_len += 1
@@ -1774,11 +1777,15 @@ class Audio(commands.Cog):
single_track = tracks[0]
if guild_data["maxlength"] > 0:
if self._track_limit(ctx, single_track, guild_data["maxlength"]):
if len(player.queue) >= 10000:
return await ctx.send("I can't add anything else to the queue.")
player.add(ctx.author, single_track)
else:
return await self._embed_msg(ctx, _("Track exceeds maximum length."))
else:
if len(player.queue) >= 10000:
return await ctx.send("I can't add anything else to the queue.")
player.add(ctx.author, single_track)
except IndexError:
return await self._embed_msg(
@@ -1939,6 +1946,7 @@ class Audio(commands.Cog):
"""Playlist configuration options."""
pass
@checks.is_owner()
@playlist.command(name="append")
async def _playlist_append(self, ctx, playlist_name, *, url):
"""Add a track URL, playlist link, or quick search to a playlist.
@@ -2066,6 +2074,7 @@ class Audio(commands.Cog):
),
)
@checks.is_owner()
@playlist.command(name="create")
async def _playlist_create(self, ctx, playlist_name):
"""Create an empty playlist."""
@@ -2139,6 +2148,7 @@ class Audio(commands.Cog):
await ctx.send(file=discord.File(to_write, filename=f"{playlist_name}.txt"))
to_write.close()
@checks.is_owner()
@playlist.command(name="info")
async def _playlist_info(self, ctx, playlist_name):
"""Retrieve information from a saved playlist."""
@@ -2241,7 +2251,7 @@ class Audio(commands.Cog):
)
return embed
@commands.cooldown(1, 15, discord.ext.commands.BucketType.guild)
@checks.is_owner()
@playlist.command(name="queue")
async def _playlist_queue(self, ctx, playlist_name=None):
"""Save the queue to a playlist."""
@@ -2297,6 +2307,7 @@ class Audio(commands.Cog):
),
)
@checks.is_owner()
@playlist.command(name="remove")
async def _playlist_remove(self, ctx, playlist_name, url):
"""Remove a track from a playlist by url."""
@@ -2336,6 +2347,7 @@ class Audio(commands.Cog):
),
)
@checks.is_owner()
@playlist.command(name="save")
async def _playlist_save(self, ctx, playlist_name, playlist_url):
"""Save a playlist from a url."""
@@ -2367,6 +2379,9 @@ class Audio(commands.Cog):
try:
player = lavalink.get_player(ctx.guild.id)
for track in playlists[playlist_name]["tracks"]:
if len(player.queue) >= 10000:
await ctx.send("I can't add anything else to the queue.")
break
if track["info"]["uri"].startswith("localtracks/"):
if not await self._localtracks_check(ctx):
pass
@@ -2376,6 +2391,7 @@ class Audio(commands.Cog):
if not self._track_limit(ctx, track["info"]["length"], maxlength):
continue
player.add(author_obj, lavalink.rest_api.Track(data=track))
await asyncio.sleep(0)
track_len += 1
if len(playlists[playlist_name]["tracks"]) > track_len:
maxlength_msg = " {bad_tracks} tracks cannot be queued.".format(
@@ -3046,6 +3062,9 @@ class Audio(commands.Cog):
track_len = 0
for track in tracks:
if len(player.queue) >= 10000:
await ctx.send("I can't add anything else to the queue.")
break
if guild_data["maxlength"] > 0:
if self._track_limit(ctx, track, guild_data["maxlength"]):
track_len += 1
@@ -3053,6 +3072,7 @@ class Audio(commands.Cog):
else:
track_len += 1
player.add(ctx.author, track)
await asyncio.sleep(0)
if not player.current:
await player.play()
if len(tracks) > track_len:
@@ -3189,10 +3209,14 @@ class Audio(commands.Cog):
if guild_data["maxlength"] > 0:
if self._track_limit(ctx, search_choice.length, guild_data["maxlength"]):
if len(player.queue) >= 10000:
return await ctx.send("I can't add anything else to the queue.")
player.add(ctx.author, search_choice)
else:
return await self._embed_msg(ctx, _("Track exceeds maximum length."))
else:
if len(player.queue) >= 10000:
return await ctx.send("I can't add anything else to the queue.")
player.add(ctx.author, search_choice)
if not player.current:
await player.play()

View File

@@ -16,8 +16,8 @@ from tqdm import tqdm
from redbot.core import data_manager
from .errors import LavalinkDownloadFailed
JAR_VERSION = "3.2.0.3"
JAR_BUILD = 796
JAR_VERSION = "3.2.1"
JAR_BUILD = 846
LAVALINK_DOWNLOAD_URL = (
f"https://github.com/Cog-Creators/Lavalink-Jars/releases/download/{JAR_VERSION}_{JAR_BUILD}/"
f"Lavalink.jar"

View File

@@ -470,6 +470,7 @@ class CustomCommands(commands.Cog):
# wrap the command here so it won't register with the bot
fake_cc = commands.command(name=ctx.invoked_with)(self.cc_callback)
fake_cc.params = self.prepare_args(raw_response)
fake_cc.requires.ready_event.set()
ctx.command = fake_cc
await self.bot.invoke(ctx)

View File

@@ -48,24 +48,8 @@ async def _init():
_conf.register_guild(mod_log=None, casetypes={})
_conf.init_custom(_CASETYPES, 1)
_conf.init_custom(_CASES, 2)
_conf.register_custom(
_CASETYPES, default_setting=None, image=None, case_str=None, audit_type=None
)
_conf.register_custom(
_CASES,
case_number=None,
action_type=None,
guild=None,
created_at=None,
user=None,
moderator=None,
reason=None,
until=None,
channel=None,
amended_by=None,
modified_at=None,
message=None,
)
_conf.register_custom(_CASETYPES)
_conf.register_custom(_CASES)
await _migrate_config(from_version=await _conf.schema_version(), to_version=_SCHEMA_VERSION)
@@ -139,6 +123,9 @@ class Case:
The attributes to change
"""
# We don't want case_number to be changed
data.pop("case_number", None)
for item in list(data.keys()):
setattr(self, item, data[item])
@@ -267,6 +254,7 @@ class Case:
else:
user_id = self.user.id
data = {
"case_number": self.case_number,
"action_type": self.action_type,
"guild": self.guild.id,
"created_at": self.created_at,
@@ -516,7 +504,7 @@ async def get_case(case_number: int, guild: discord.Guild, bot: Red) -> Case:
"""
case = await _conf.custom(_CASES, str(guild.id), str(case_number)).all()
if not case["case_number"]:
if not case:
raise RuntimeError("That case does not exist for guild {}".format(guild.name))
mod_channel = await get_modlog_channel(guild)
return await Case.from_json(mod_channel, bot, case_number, case)
@@ -693,14 +681,12 @@ async def get_casetype(name: str, guild: Optional[discord.Guild] = None) -> Opti
-------
Optional[CaseType]
"""
try:
data = await _conf.custom(_CASETYPES, name).all()
except KeyError:
data = await _conf.custom(_CASETYPES, name).all()
if not data:
return
else:
casetype = CaseType.from_json(name, data)
casetype.guild = guild
return casetype
casetype = CaseType.from_json(name, data)
casetype.guild = guild
return casetype
async def get_all_casetypes(guild: discord.Guild = None) -> List[CaseType]:

View File

@@ -35,7 +35,7 @@ install_requires =
Click==7.0
colorama==0.4.1
contextlib2==0.5.5
discord.py==1.2.3
discord.py==1.2.5
distro==1.4.0; sys_platform == "linux"
fuzzywuzzy==0.17.0
idna==2.8
@@ -45,7 +45,7 @@ install_requires =
Red-Lavalink==0.3.0
schema==0.7.0
tqdm==4.32.2
uvloop==0.12.2; sys_platform != "win32" and platform_python_implementation == "CPython"
uvloop==0.14.0; sys_platform != "win32" and platform_python_implementation == "CPython"
websockets==6.0
yarl==1.3.0