aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Goes <[email protected]>2018-12-24 19:49:01 -0700
committerGravatar GitHub <[email protected]>2018-12-24 19:49:01 -0700
commitd2e33b649813080984590a6a51d26b6af5325784 (patch)
treec89f22e408f9e9e02815dfd7dc05556349167ffc
parentMakes generating `...:` indents faster (diff)
parentMerge pull request #219 from python-discord/force-bb-watch-note (diff)
Merge branch 'master' into patch-1
-rw-r--r--README.md2
-rw-r--r--bot/cogs/alias.py6
-rw-r--r--bot/cogs/bigbrother.py12
-rw-r--r--config-default.yml12
-rw-r--r--docker/base.Dockerfile1
5 files changed, 17 insertions, 16 deletions
diff --git a/README.md b/README.md
index bfa9d3e42..1c9e52b71 100644
--- a/README.md
+++ b/README.md
@@ -3,5 +3,5 @@
[![Build Status](https://dev.azure.com/python-discord/Python%20Discord/_apis/build/status/Bot%20(Mainline))](https://dev.azure.com/python-discord/Python%20Discord/_build/latest?definitionId=1)
[![Discord](https://discordapp.com/api/guilds/267624335836053506/embed.png)](https://discord.gg/2B963hn)
-This project is a Discord bot specifically for use with the Python Discord server. It will provide numerous utilities
+This project is a Discord bot specifically for use with the Python Discord server. It provides numerous utilities
and other tools to help keep the server running like a well-oiled machine.
diff --git a/bot/cogs/alias.py b/bot/cogs/alias.py
index 12edb202f..2ce4a51e3 100644
--- a/bot/cogs/alias.py
+++ b/bot/cogs/alias.py
@@ -1,7 +1,7 @@
import inspect
import logging
-from discord import Colour, Embed, TextChannel, User
+from discord import Colour, Embed, User
from discord.ext.commands import (
Command, Context, clean_content, command, group
)
@@ -71,13 +71,13 @@ class Alias:
@command(name="watch", hidden=True)
async def bigbrother_watch_alias(
- self, ctx, user: User, channel: TextChannel = None
+ self, ctx, user: User, *, reason: str = None
):
"""
Alias for invoking <prefix>bigbrother watch user [text_channel].
"""
- await self.invoke(ctx, "bigbrother watch", user, channel)
+ await self.invoke(ctx, "bigbrother watch", user, reason=reason)
@command(name="unwatch", hidden=True)
async def bigbrother_unwatch_alias(self, ctx, user: User):
diff --git a/bot/cogs/bigbrother.py b/bot/cogs/bigbrother.py
index 7964c81a8..29b13f038 100644
--- a/bot/cogs/bigbrother.py
+++ b/bot/cogs/bigbrother.py
@@ -216,11 +216,12 @@ class BigBrother:
@bigbrother_group.command(name='watch', aliases=('w',))
@with_role(Roles.owner, Roles.admin, Roles.moderator)
- async def watch_command(self, ctx: Context, user: User, *, reason: str = None):
+ async def watch_command(self, ctx: Context, user: User, *, reason: str):
"""
Relay messages sent by the given `user` to the `#big-brother-logs` channel
- If a `reason` is specified, a note is added for `user`
+ A `reason` for watching is required, which is added for the user to be watched as a
+ note (aka: shadow warning)
"""
channel_id = Channels.big_brother_logs
@@ -251,10 +252,9 @@ class BigBrother:
reason = data.get('error_message', "no message provided")
await ctx.send(f":x: the API returned an error: {reason}")
- # Add a note (shadow warning) if a reason is specified
- if reason:
- reason = "bb watch: " + reason # Prepend for situational awareness
- await post_infraction(ctx, user, type="warning", reason=reason, hidden=True)
+ # Add a note (shadow warning) with the reason for watching
+ reason = "bb watch: " + reason # Prepend for situational awareness
+ await post_infraction(ctx, user, type="warning", reason=reason, hidden=True)
@bigbrother_group.command(name='unwatch', aliases=('uw',))
@with_role(Roles.owner, Roles.admin, Roles.moderator)
diff --git a/config-default.yml b/config-default.yml
index 41383a6ae..e7145289d 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -19,13 +19,13 @@ style:
emojis:
defcon_disabled: "<:defcondisabled:470326273952972810>"
- defcon_enabled: "<:defconenabled:470326274213150730>"
- defcon_updated: "<:defconsettingsupdated:470326274082996224>"
+ defcon_enabled: "<:defconenabled:470326274213150730>"
+ defcon_updated: "<:defconsettingsupdated:470326274082996224>"
green_chevron: "<:greenchevron:418104310329769993>"
red_chevron: "<:redchevron:418112778184818698>"
white_chevron: "<:whitechevron:418110396973711363>"
- lemoneye2: "<:lemoneye2:435193765582340098>"
+ bb_message: "<:bbmessage:472476937504423936>"
status_online: "<:status_online:470326272351010816>"
status_idle: "<:status_idle:470326266625785866>"
@@ -42,7 +42,7 @@ style:
crown_green: "https://cdn.discordapp.com/emojis/469964154719961088.png"
crown_red: "https://cdn.discordapp.com/emojis/469964154879344640.png"
- defcon_denied: "https://cdn.discordapp.com/emojis/472475292078964738.png"
+ defcon_denied: "https://cdn.discordapp.com/emojis/472475292078964738.png"
defcon_disabled: "https://cdn.discordapp.com/emojis/470326273952972810.png"
defcon_enabled: "https://cdn.discordapp.com/emojis/470326274213150730.png"
defcon_updated: "https://cdn.discordapp.com/emojis/472472638342561793.png"
@@ -68,8 +68,8 @@ style:
user_unban: "https://cdn.discordapp.com/emojis/469952898692808704.png"
user_update: "https://cdn.discordapp.com/emojis/469952898684551168.png"
- user_mute: "https://cdn.discordapp.com/emojis/472472640100106250.png"
- user_unmute: "https://cdn.discordapp.com/emojis/472472639206719508.png"
+ user_mute: "https://cdn.discordapp.com/emojis/472472640100106250.png"
+ user_unmute: "https://cdn.discordapp.com/emojis/472472639206719508.png"
user_verified: "https://cdn.discordapp.com/emojis/470326274519334936.png"
pencil: "https://cdn.discordapp.com/emojis/470326272401211415.png"
diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile
index a1ec0866e..e46db756a 100644
--- a/docker/base.Dockerfile
+++ b/docker/base.Dockerfile
@@ -8,6 +8,7 @@ RUN apk add --update jpeg-dev
RUN apk add --update libxml2 libxml2-dev libxslt-dev
RUN apk add --update zlib-dev
RUN apk add --update freetype-dev
+RUN apk add --update git
ENV LIBRARY_PATH=/lib:/usr/lib
ENV PIPENV_VENV_IN_PROJECT=1