async def METHOD_NAME(self, ctx, username: str = None, password: str = None):
    """Set the MongoDB server credentials."""
    await self.config.custom("MONGODB").username.set(username)
    await self.config.custom("MONGODB").password.set(password)
    message = await ctx.send("MongoDB credentials set.\nNow trying to connect...")
    client = await self._connect_to_mongo()
    if not client:
        return await message.edit(
            content=message.content.replace("Now trying to connect...", "")
            + "Failed to connect. Please try again with valid credentials."
        )
    await message.edit(content=message.content.replace("Now trying to connect...", ""))