diff --git a/modules/basic.py b/modules/basic.py index 8b04f47..0b49fe7 100644 --- a/modules/basic.py +++ b/modules/basic.py @@ -21,7 +21,9 @@ class BasicCog(commands.Cog): ) @commands.check(universal.channel_check) async def ping(self, ctx): - await ctx.respond(f"SB latency: {round(self.bot.latency * 1000, 2)} ms") + ping = round(self.bot.latency * 1000, 2) + await ctx.respond(f"SB latency: {ping} ms") + racu_logs.info(f"{ctx.author.name} used the ping command. | ping: {ping} ms") @commands.slash_command( name="restart", @@ -31,6 +33,7 @@ class BasicCog(commands.Cog): @commands.check(universal.owner_check) async def restart(self, ctx): await ctx.respond(content="Restarting..", ephemeral=True) + racu_logs.info(f"{ctx.author.name} used the restart command.") try: racu_logs.info(subprocess.check_output(["/bin/bash", "racu_update.sh"])) @@ -44,6 +47,8 @@ class BasicCog(commands.Cog): ) @commands.dm_only() async def intro(self, ctx): + racu_logs.info(f"{ctx.author.name} used the intro command.") + guild_id = 719227135151046699 channel_id = 973619250507972618 muted_role_id = 754895743151505489 @@ -65,11 +70,13 @@ class BasicCog(commands.Cog): em = discord.Embed(description="You're muted in the Rave Cave. You can't perform this command.", color=0xadcca6) await ctx.respond(embed=em) + racu_logs.warning(f"{ctx.author.name} couldn't do the intro command: Muted in the Race Cave") return elif member and not discord.utils.get(member.roles, id=719995790319157279): em = discord.Embed(description="It seems that you don't have permission to do that!") await ctx.respond(embed=em) + racu_logs.warning(f"{ctx.author.name} couldn't do the intro command: No Permissions") return embed = discord.Embed(color=0xadcca6, @@ -98,6 +105,7 @@ class BasicCog(commands.Cog): return message.author == ctx.author and isinstance(message.channel, discord.DMChannel) if view.clickedShort: + racu_logs.debug(f"{ctx.author.name} clicked Short Intro") # START NICKNAME await ctx.send(embed=embeds.simple_question_first("How would you like to be identified in the server?")) @@ -108,6 +116,7 @@ class BasicCog(commands.Cog): if len(nickname) > 100: nickname = nickname[:100] nickname = nickname.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} nickname: {nickname}") # START AGE await ctx.send(embed=embeds.simple_question_5("How old are you?"), @@ -119,6 +128,7 @@ class BasicCog(commands.Cog): if len(age) > 5: age = age[:5] age = age.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} age: {age}") # START LOCATION view = interaction.LocationOptions(ctx) @@ -133,6 +143,8 @@ class BasicCog(commands.Cog): await ctx.send(embed=embeds.no_time()) return + racu_logs.debug(f"{ctx.author.name} location: {location}") + # START PRONOUNS await ctx.send( embed=embeds.simple_question_30("What are your preferred pronouns?"), @@ -144,6 +156,7 @@ class BasicCog(commands.Cog): if len(pronouns) > 30: pronouns = pronouns[:30] pronouns = pronouns.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} pronouns: {pronouns}") # START LIKES await ctx.send(embed=embeds.simple_question_300("Likes & interests"), @@ -155,6 +168,7 @@ class BasicCog(commands.Cog): if len(likes) > 300: likes = likes[:300] likes = likes.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} likes: {likes}") # START DISLIKES await ctx.send(embed=embeds.simple_question_300("Dislikes"), @@ -166,6 +180,7 @@ class BasicCog(commands.Cog): if len(dislikes) > 300: dislikes = dislikes[:300] dislikes = dislikes.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} dislikes: {dislikes}") # POST EXAMPLE EMBED AND FINAL IF APPROVED em = embeds.final_embed_short(ctx, nickname, age, location, pronouns, likes, dislikes) @@ -178,32 +193,41 @@ class BasicCog(commands.Cog): intro_channel = guild.get_channel(channel_id) await intro_channel.send(embed=em, content=f"Introduction of <@{ctx.author.id}>") await ctx.send(embed=embeds.final_confirmation(channel_id)) + racu_logs.info(f"{ctx.author.name} Intro Sent") return else: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return elif view.clickedLong: + racu_logs.debug(f"{ctx.author.name} clicked Long Intro") + # START NICKNAME await ctx.send(embed=embeds.simple_question_first_extended( "How would you like to be identified in the server?")) @@ -214,6 +238,7 @@ class BasicCog(commands.Cog): if len(nickname) > 100: nickname = nickname[:100] nickname = nickname.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} nickname: {nickname}") # START AGE await ctx.send(embed=embeds.simple_question_5("How old are you?"), @@ -225,6 +250,7 @@ class BasicCog(commands.Cog): if len(age) > 5: age = age[:5] age = age.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} age: {age}") # START LOCATION view = interaction.LocationOptions(ctx) @@ -239,6 +265,8 @@ class BasicCog(commands.Cog): await ctx.send(embed=embeds.no_time()) return + racu_logs.debug(f"{ctx.author.name} location: {location}") + # START LANGUAGES await ctx.send( embed=embeds.simple_question_100("Which languages do you speak?"), @@ -251,6 +279,7 @@ class BasicCog(commands.Cog): if len(languages) > 30: languages = languages[:30] languages = languages.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} languages: {languages}") # START PRONOUNS await ctx.send( @@ -263,6 +292,7 @@ class BasicCog(commands.Cog): if len(pronouns) > 30: pronouns = pronouns[:30] pronouns = pronouns.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} pronouns: {pronouns}") # START SEXUALITY await ctx.send( @@ -275,6 +305,7 @@ class BasicCog(commands.Cog): if len(sexuality) > 30: sexuality = sexuality[:30] sexuality = sexuality.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} sexuality: {sexuality}") # START RELATIONSHIP_STATUS await ctx.send( @@ -288,6 +319,7 @@ class BasicCog(commands.Cog): if len(relationship_status) > 30: relationship_status = relationship_status[:30] relationship_status = relationship_status.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} relationship_status: {relationship_status}") # START LIKES await ctx.send(embed=embeds.simple_question_300("Likes & interests"), @@ -299,6 +331,7 @@ class BasicCog(commands.Cog): if len(likes) > 300: likes = likes[:300] likes = likes.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} likes: {likes}") # START DISLIKES await ctx.send(embed=embeds.simple_question_300("Dislikes"), @@ -311,6 +344,7 @@ class BasicCog(commands.Cog): if len(dislikes) > 300: dislikes = dislikes[:300] dislikes = dislikes.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} dislikes: {dislikes}") # START EXTRA await ctx.send(embed=embeds.simple_question_300( @@ -325,6 +359,7 @@ class BasicCog(commands.Cog): if len(extra) > 300: extra = extra[:300] extra = extra.replace("\n", " ") + racu_logs.debug(f"{ctx.author.name} extra: {extra}") # POST EXAMPLE EMBED AND FINAL IF APPROVED em = embeds.final_embed_extended(ctx, nickname, age, location, @@ -342,48 +377,60 @@ class BasicCog(commands.Cog): await intro_channel.send(embed=em, content=f"Introduction of <@{ctx.author.id}>") await ctx.send(embed=embeds.final_confirmation(channel_id)) + racu_logs.info(f"{ctx.author.name} Intro Sent") return else: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return except asyncio.TimeoutError: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return else: await ctx.send(embed=embeds.no_time()) + racu_logs.warning(f"{ctx.author.id} Intro Timeout") return