Compare commits

..

No commits in common. "master" and "v3.0.1" have entirely different histories.

4 changed files with 4 additions and 14 deletions

View File

@ -1,7 +1,7 @@
FROM python:3.9.6-slim
FROM python:slim
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN apt-get update -y && apt-get upgrade -y && apt-get install libopus0 -y && \
pip install --upgrade pip setuptools wheel && pip install -r requirements.txt && \
pip install --upgrade pip && pip install -r requirements.txt && \
apt-get autoremove -y
CMD python3 -u ./bot.py

View File

@ -17,15 +17,6 @@ class PitchListener(commands.Cog, name='Pitch Listener'):
def __init__(self, client):
self.client = client
@commands.Cog.listener(name='on_component')
async def _response_defer(self, ctx:ComponentContext):
pitches = yaml_load(pitchesFile)
guildStr = str(ctx.guild.id)
if not pitches.get(guildStr, {}): return # If no pitches for current guild, ignore.
[timeslot] = [*pitches[guildStr]]
if ctx.origin_message.id not in pitches[guildStr][timeslot]['messages'] + [pitches[guildStr][timeslot]['control']]: return # If the context id is not in the pitch menu, ignore
await ctx.defer(hidden = True)
@commands.Cog.listener(name='on_component')
async def _pitch_listener(self, ctx:ComponentContext):
conf = yaml_load(configFile)

View File

@ -23,8 +23,7 @@ class RestrictionListener(commands.Cog, name='Membership Restriction Listener'):
lookup = yaml_load(lookupFile)
if not conf[guildStr].get('restrict',False): return
if message.author.bot: return
if message.channel.category is None: return
if str(message.channel.category.id) not in categories[guildStr]: return
if str(message.channel.category) in categories[guildStr]: return
if (set(message.author.roles) & set([message.guild.get_role(x) for x in conf[guildStr]['roles']['admin']]) or message.author == message.guild.owner): return
if set(message.author.roles) & set([message.guild.get_role(x) for x in conf[guildStr]['membership']]): return
if message.channel.overwrites_for(message.author).manage_channels: return

View File

@ -129,7 +129,7 @@ class Configuration(commands.Cog, name='Configuration Commands'):
if self.client.get_cog('Pitch Command') is None:
loadCog(f'./{cogsDir}/slashcommands/secondary/pitch.py')
flag = True
if flag: await self.client.slash.sync_all_commands()
if flag: await self.client.slash.sync_all_commands()
@cog_ext.cog_subcommand(
base='config',