From 3534937b2563b96d5f5aebe5389ef5e4b3f3c4c8 Mon Sep 17 00:00:00 2001 From: Anubhav1603 Date: Tue, 29 Sep 2020 13:32:57 +0530 Subject: added github url of seasonal bot --- bot/constants.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 7c8f72cb..417f384c 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -265,3 +265,6 @@ POSITIVE_REPLIES = [ class Wikipedia: total_chance = 3 + +class Source: + github = "https://github.com/python-discord/seasonalbot" -- cgit v1.2.3 From 5f8b67244562317ffc5648eff53bf35fb0d5faa9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Wed, 30 Sep 2020 21:27:20 +0200 Subject: Remove SpookySound Cog that played sounds in voice We had an old Cog that would allow our members to run a command to make Seasonal Bot join a voice channel to play a spooky sound. However, as our voice channel use has changed over the past year, we don't think that it's still a good idea to do this. That's why I removed the Cog and the constants related to it. --- bot/constants.py | 5 ---- bot/exts/halloween/spookysound.py | 48 --------------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 bot/exts/halloween/spookysound.py (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 935b90e0..0c376344 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -11,7 +11,6 @@ __all__ = ( "Client", "Colours", "Emojis", - "Hacktoberfest", "Icons", "Lovefest", "Month", @@ -129,10 +128,6 @@ class Emojis: status_offline = "<:status_offline:470326266537705472>" -class Hacktoberfest(NamedTuple): - voice_id = 514420006474219521 - - class Icons: questionmark = "https://cdn.discordapp.com/emojis/512367613339369475.png" bookmark = ( diff --git a/bot/exts/halloween/spookysound.py b/bot/exts/halloween/spookysound.py deleted file mode 100644 index 569a9153..00000000 --- a/bot/exts/halloween/spookysound.py +++ /dev/null @@ -1,48 +0,0 @@ -import logging -import random -from pathlib import Path - -import discord -from discord.ext import commands - -from bot.bot import SeasonalBot -from bot.constants import Hacktoberfest - -log = logging.getLogger(__name__) - - -class SpookySound(commands.Cog): - """A cog that plays a spooky sound in a voice channel on command.""" - - def __init__(self, bot: SeasonalBot): - self.bot = bot - self.sound_files = list(Path("bot/resources/halloween/spookysounds").glob("*.mp3")) - self.channel = None - - @commands.cooldown(rate=1, per=1) - @commands.command(brief="Play a spooky sound, restricted to once per 2 mins") - async def spookysound(self, ctx: commands.Context) -> None: - """ - Connect to the Hacktoberbot voice channel, play a random spooky sound, then disconnect. - - Cannot be used more than once in 2 minutes. - """ - if not self.channel: - await self.bot.wait_until_guild_available() - self.channel = self.bot.get_channel(Hacktoberfest.voice_id) - - await ctx.send("Initiating spooky sound...") - file_path = random.choice(self.sound_files) - src = discord.FFmpegPCMAudio(str(file_path.resolve())) - voice = await self.channel.connect() - voice.play(src, after=lambda e: self.bot.loop.create_task(self.disconnect(voice))) - - @staticmethod - async def disconnect(voice: discord.VoiceClient) -> None: - """Helper method to disconnect a given voice client.""" - await voice.disconnect() - - -def setup(bot: SeasonalBot) -> None: - """Spooky sound Cog load.""" - bot.add_cog(SpookySound(bot)) -- cgit v1.2.3 From 15324b3428e80d2e7a37ba84443983684e834ffc Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Wed, 30 Sep 2020 21:29:11 +0200 Subject: Update the Hacktoberfest channel constant I've updated the Hacktoberfest channel ID to the ID of the new channel just created for the 2020 edition of the event. --- bot/constants.py | 2 +- bot/exts/halloween/hacktoberstats.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 0c376344..7ec8ac27 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -74,7 +74,7 @@ class Channels(NamedTuple): python_discussion = 267624335836053506 show_your_projects = int(environ.get("CHANNEL_SHOW_YOUR_PROJECTS", 303934982764625920)) show_your_projects_discussion = 360148304664723466 - hacktoberfest_2019 = 628184417646411776 + hacktoberfest_2020 = 760857070781071431 class Client(NamedTuple): diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py index db5e37f2..92429c1b 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/halloween/hacktoberstats.py @@ -18,7 +18,7 @@ log = logging.getLogger(__name__) CURRENT_YEAR = datetime.now().year # Used to construct GH API query PRS_FOR_SHIRT = 4 # Minimum number of PRs before a shirt is awarded -HACKTOBER_WHITELIST = WHITELISTED_CHANNELS + (Channels.hacktoberfest_2019,) +HACKTOBER_WHITELIST = WHITELISTED_CHANNELS + (Channels.hacktoberfest_2020,) class HacktoberStats(commands.Cog): -- cgit v1.2.3 From 276d3631ac260ac21f0825dba8aff9dfa0c107c0 Mon Sep 17 00:00:00 2001 From: Anubhav1603 Date: Fri, 2 Oct 2020 19:13:48 +0530 Subject: added github_avatar_url --- bot/constants.py | 1 + 1 file changed, 1 insertion(+) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 417f384c..a0c9f31e 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -268,3 +268,4 @@ class Wikipedia: class Source: github = "https://github.com/python-discord/seasonalbot" + github_avatar_url = "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" -- cgit v1.2.3 From 3c418746112d020549fcbeac386aca0f18abebba Mon Sep 17 00:00:00 2001 From: Anubhav1603 Date: Sat, 3 Oct 2020 12:51:25 +0530 Subject: changed github_avatar_url --- bot/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index a0c9f31e..a9c9e23e 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -268,4 +268,4 @@ class Wikipedia: class Source: github = "https://github.com/python-discord/seasonalbot" - github_avatar_url = "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" + github_avatar_url = "https://avatars1.githubusercontent.com/u/9919" -- cgit v1.2.3