Only display reason if reason exists
This commit is contained in:
parent
a5dccf50e2
commit
23199f113d
1 changed files with 7 additions and 6 deletions
|
@ -2,13 +2,12 @@ import asyncio
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
import discord
|
||||
import jarvis
|
||||
import pymongo
|
||||
from discord import DMChannel
|
||||
from discord.ext import commands
|
||||
from discord.utils import find
|
||||
from discord_slash import SlashContext
|
||||
|
||||
import jarvis
|
||||
from jarvis.config import get_config
|
||||
from jarvis.utils import build_embed
|
||||
from jarvis.utils.db import DBManager
|
||||
|
@ -45,8 +44,9 @@ class ModlogCog(commands.Cog):
|
|||
value=f"{admin.mention} ({admin.name}"
|
||||
+ f"#{admin.discriminator})",
|
||||
),
|
||||
Field(name="Reason", value=log.reason, inline=False),
|
||||
]
|
||||
if log.reason:
|
||||
fields.append(Field(name="Reason", value=log.reason, inline=False))
|
||||
embed = build_embed(
|
||||
title=title,
|
||||
description=desc,
|
||||
|
@ -328,9 +328,10 @@ class ModlogCog(commands.Cog):
|
|||
+ f"#{log.user.discriminator})",
|
||||
)
|
||||
)
|
||||
fields.append(
|
||||
Field(name="Reason", value=log.reason, inline=False),
|
||||
)
|
||||
if log.reason:
|
||||
fields.append(
|
||||
Field(name="Reason", value=log.reason, inline=False),
|
||||
)
|
||||
embed = build_embed(
|
||||
title="User Nick Changed",
|
||||
description=f"{after.mention} changed their nickname",
|
||||
|
|
Loading…
Add table
Reference in a new issue